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:
Tim van der Meij 2024-01-21 20:34:22 +01:00 committed by GitHub
commit 1ed68933e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
@ -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();
});
}