Skip to content

Commit bb448d3

Browse files
committed
chore: set exit code
1 parent 43fc00b commit bb448d3

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

test/bench/etc/run_granular_benchmarks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const DOCUMENT_ROOT = path.resolve(`${__dirname}/../documents`);
6666
}
6767
}
6868

69-
console.log('No duplcate testName:Option pairs found. Now merging files...');
69+
console.log('No duplicate testName:Option pairs found. Now merging files...');
7070

7171
const meansFile = `${__dirname}/resultsCollectedMeans.json`;
7272
// Iterate over all result files and merge into one file

test/bench/granular/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Suite } from 'dbx-js-tools/packages/bson-bench';
2-
import * as process from 'process';
32
import * as path from 'path';
43
import * as fs from 'fs/promises';
54

@@ -62,6 +61,7 @@ export function getMixedTestTags(documentPath: string) {
6261
export async function runSuiteAndWriteResults(suite: Suite) {
6362
const targetDirectory = path.resolve(`${__dirname}/../../etc`);
6463
await suite.run();
64+
if (suite.errors.length) process.exitCode = 1;
6565
await suite.writeResults(`${targetDirectory}/${suite.name.toLowerCase()}Results.json`);
6666
}
6767

test/bench/spec/bsonBench.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ suite.task({
7878
});
7979

8080
suite.run().then(async () => {
81+
if (suite.errors.length) process.exitCode = 1;
82+
8183
const cpuBaseline = await readFile(
8284
join(__dirname, '..', '..', 'etc', 'cpuBaseline.json'),
8385
'utf8'

0 commit comments

Comments
 (0)