Merge pull request #17555 from timvandermeij/gulpfile-exit-code
Don't ignore `test.mjs` child process exit codes in the Gulpfile
This commit is contained in:
commit
1ed68933e5
@ -691,6 +691,9 @@ function createTestSource(testsName, { bot = false, xfaOnly = false } = {}) {
|
|||||||
|
|
||||||
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||||
testProcess.on("close", function (code) {
|
testProcess.on("close", function (code) {
|
||||||
|
if (code !== 0) {
|
||||||
|
throw new Error(`Running ${testsName} tests failed.`);
|
||||||
|
}
|
||||||
source.push(null);
|
source.push(null);
|
||||||
});
|
});
|
||||||
return undefined;
|
return undefined;
|
||||||
@ -722,6 +725,10 @@ function makeRef(done, bot) {
|
|||||||
|
|
||||||
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
const testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" });
|
||||||
testProcess.on("close", function (code) {
|
testProcess.on("close", function (code) {
|
||||||
|
if (code !== 0) {
|
||||||
|
done(new Error("Creating reference images failed."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user