Skip to content

Commit 31a8c68

Browse files
committed
[fix test] Make test runner exit after test exits
1 parent 87999d0 commit 31a8c68

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/core/run

+6-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
//
3636

3737
var path = require('path'),
38+
spawn = require('child_process').spawn,
3839
httpProxy = require('../../'),
3940
common = require('./common');
4041

@@ -50,7 +51,11 @@ var proxy = httpProxy.createServer(common.PORT, 'localhost');
5051
proxy.listen(common.PROXY_PORT);
5152

5253
proxy.on('listening', function () {
53-
require(path.join(process.cwd(), process.argv[2]));
54+
console.log('Proxy server listening on ' + common.PROXY_PORT);
55+
var testProcess = spawn(process.argv[0], [ process.argv[2] ]);
56+
testProcess.stdout.pipe(process.stdout);
57+
testProcess.stderr.pipe(process.stderr);
58+
testProcess.on('exit', process.exit);
5459
});
5560

5661
// vim:filetype=javascript

0 commit comments

Comments
 (0)