0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/tools/run-worker.js
Michael Dawson 5f348b4572 test: move test-crypto-engine to addon
Fixes: https://github.com/nodejs/node/issues/41633
Fixes: https://github.com/nodejs/node/issues/40958

- move test-crypto-engine so that dummy engine
  is only built if tests are run

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/41830
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2022-02-07 17:29:54 -05:00

12 lines
318 B
JavaScript

'use strict';
if (typeof require === 'undefined') {
console.log('1..0 # Skipped: Not being run as CommonJS');
process.exit(0);
}
const path = require('path');
const { Worker } = require('worker_threads');
new Worker(path.resolve(process.cwd(), process.argv[2]))
.on('exit', (code) => process.exitCode = code);