Skip to content

Commit 2db824a

Browse files
committed
Make CI tests actually fail if there is an error in build_tests
1 parent 30d8847 commit 2db824a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/ciTest.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ async function runTests() {
5454
console.log("Doing build_tests");
5555
const buildTestDir = path.join(__dirname, "..", "jscomp", "build_tests");
5656
const files = fs.readdirSync(buildTestDir);
57+
58+
let hasError = false;
59+
5760
for (const file of files) {
5861
const testDir = path.join(buildTestDir, file);
5962
if (file === "node_modules" || !fs.lstatSync(testDir).isDirectory()) {
@@ -72,9 +75,14 @@ async function runTests() {
7275
console.log("✅ success in", file);
7376
} else {
7477
console.log(`❌ error in ${file} with stderr:\n`, out.stderr);
78+
hasError = true;
7579
}
7680
}
7781
}
82+
83+
if (hasError) {
84+
process.exit(1);
85+
}
7886
}
7987

8088
if (formatTest) {

0 commit comments

Comments
 (0)