Skip to content

Commit e569de8

Browse files
committed
Make the bat script stop after failure
1 parent dbc4d15 commit e569de8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

scripts/run_all.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FOR /D %%G in ("*") DO (
1010
cd %%G
1111
IF EXIST "package.json" (
1212
npm install
13-
npm run "%command%"
13+
npm run "%command%" || cmd /c exit -1073741510
1414
)
1515
cd ..
1616
)

tests/code_coverage/coverage.test.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,14 @@ describe("Source code coverage reports for regular fuzz targets", () => {
9999
});
100100

101101
it("Want coverage in a non-default directory, instrumentation enabled, with custom hooks", () => {
102-
const coverageDirectory = path.join(testDirectory, "coverage002");
102+
const coverageDirectory = "coverage002";
103+
const coverageAbsoluteDirectory = path.join(
104+
testDirectory,
105+
coverageDirectory
106+
);
103107
executeFuzzTest(false, true, true, true, true, coverageDirectory);
104-
expect(fs.existsSync(coverageDirectory)).toBe(true);
105-
const coverageJson = readCoverageJson(coverageDirectory);
108+
expect(fs.existsSync(coverageAbsoluteDirectory)).toBe(true);
109+
const coverageJson = readCoverageJson(coverageAbsoluteDirectory);
106110
const expectedCoverage = readExpectedCoverage("fuzz+lib+customHooks.json");
107111
expect(coverageJson).toBeTruthy();
108112
// lib.js
@@ -303,6 +307,7 @@ function executeFuzzTest(
303307
const process = spawnSync("npx", options, {
304308
stdio: "pipe",
305309
cwd: testDirectory,
310+
shell: true,
306311
});
307312
if (verbose) console.log(process.output.toString());
308313
}

0 commit comments

Comments
 (0)