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 e5890b1 commit de40b29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/compiler.js
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 de40b29

Please sign in to comment.