Skip to content

Commit

Permalink
test: Try harder to fix macOS/Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsergio committed May 2, 2024
1 parent 1c35483 commit 2f96c3f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions out/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ function runTests(buildDirPath) {
/// On macOS and Windows we don't have ldd or equivalent, so we can't check if the test links to QtTest
/// Use the help way instead
yield qt.removeByRunningHelp();
/// Remove the non-qttest executable from qt.qtTestExecutables
qt.qtTestExecutables = qt.qtTestExecutables.filter((e) => !e.filenameWithoutExtension().endsWith("non_qttest"));
if (qt.qtTestExecutables.length != 3) {
console.error("Expected 3 executables, at this point got " +
qt.qtTestExecutables.length);
process.exit(1);
}
// 1. Test that the executable test names are correct:
var i = 0;
for (var executable of qt.qtTestExecutables) {
Expand Down
13 changes: 13 additions & 0 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ async function runTests(buildDirPath: string) {
/// Use the help way instead
await qt.removeByRunningHelp();

/// Remove the non-qttest executable from qt.qtTestExecutables
qt.qtTestExecutables = qt.qtTestExecutables.filter(
(e) => !e.filenameWithoutExtension().endsWith("non_qttest"),
);

if (qt.qtTestExecutables.length != 3) {
console.error(
"Expected 3 executables, at this point got " +
qt.qtTestExecutables.length,
);
process.exit(1);
}

// 1. Test that the executable test names are correct:
var i = 0;
for (var executable of qt.qtTestExecutables) {
Expand Down

0 comments on commit 2f96c3f

Please sign in to comment.