Last active
August 29, 2015 14:08
-
-
Save wilsonianb/727ab0c8c1f1b65a6e6f to your computer and use it in GitHub Desktop.
Run nodejs tests in a child process
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run node.js tests in a child process with the command: | |
// tools/test.py --special-command='node node-tests.js@' --mode=release simple message | |
var spawn = require('child_process').spawn; | |
var opts = { | |
stdio: [process.stdin, process.stdout, process.stderr] | |
}; | |
var args = [process.argv[2], process.argv.slice(3), opts]; | |
var child = spawn.apply(null, args); | |
child.on('close', function(code) { | |
process.exit(code); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment