From bac4d1212a2e0e05d6a7fb3159f289997ca7ed39 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 19 Aug 2017 18:17:04 -0700 Subject: [PATCH] test: add test-benchmark-os Add minimal test to confirm that os benchmarks run. PR-URL: https://github.com/nodejs/node/pull/14951 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-benchmark-os.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/parallel/test-benchmark-os.js diff --git a/test/parallel/test-benchmark-os.js b/test/parallel/test-benchmark-os.js new file mode 100644 index 0000000000..4ad179063a --- /dev/null +++ b/test/parallel/test-benchmark-os.js @@ -0,0 +1,20 @@ +'use strict'; + +require('../common'); + +// Minimal test for os benchmarks. This makes sure the benchmarks aren't +// horribly broken but nothing more than that. + +const assert = require('assert'); +const fork = require('child_process').fork; +const path = require('path'); + +const runjs = path.join(__dirname, '..', '..', 'benchmark', 'run.js'); +const argv = ['--set', 'n=1', + 'os']; + +const child = fork(runjs, argv); +child.on('exit', (code, signal) => { + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); +});