Skip to content

Commit

Permalink
Merge pull request mozilla#17555 from timvandermeij/gulpfile-exit-code
Browse files Browse the repository at this point in the history
Don't ignore `test.mjs` child process exit codes in the Gulpfile
  • Loading branch information
timvandermeij authored Jan 21, 2024
2 parents d549c2e + 6dd77b3 commit 1ed6893
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gulpfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,9 @@ function createTestSource(testsName, { bot = false, xfaOnly = false } = {}) {

const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
testProcess.on("close", function (code) {
if (code !== 0) {
throw new Error(`Running ${testsName} tests failed.`);
}
source.push(null);
});
return undefined;
Expand Down Expand Up @@ -722,6 +725,10 @@ function makeRef(done, bot) {

const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
testProcess.on("close", function (code) {
if (code !== 0) {
done(new Error("Creating reference images failed."));
return;
}
done();
});
}
Expand Down

0 comments on commit 1ed6893

Please sign in to comment.