aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/lib/spawn_test.js
blob: 1461554117f9ffee4d411ec72a4224f6ac24cff7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"use strict";

// Run Node with provided parameters: the first one being the Grunt
// done function and latter ones being files to be tested.
// See the comment in ../node_smoke_tests.js for more information.
module.exports = function spawnTest( done, command ) {
	var spawn = require( "child_process" ).spawn;

	spawn( command, {
		stdio: "inherit",
		shell: true
	} )
		.on( "close", function( code ) {
			done( code === 0 );
		} );
};