Skip to content

Commit

Permalink
Skip fixture comparisons and remaining tests if compilation failed
Browse files Browse the repository at this point in the history
If the test is supposed to compile, but compilation fails instead,
there's no point in diffing fixtures (unless you like a wall of red in
your terminal). It also turns out that execution never reaches the
diffing section, since writing the non-existent debug Wasm binary fails.
  • Loading branch information
CountBleck committed Sep 30, 2023
1 parent a94f551 commit afd90e7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,10 @@ async function runTest(basename) {
}
compareStderr.end(SUCCESS);
return prepareResult(SUCCESS);
} else if (error) {
// Don't bother comparing fixtures or doing anything else if the
// compilation failed.
return prepareResult(FAILURE, "compile failed");
}

const afterCompileResult = afterCompile("debug");
Expand Down

0 comments on commit afd90e7

Please sign in to comment.