0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-28 22:46:31 +01:00

test: split test in parallel/sequential

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/iojs/io.js/pull/172
Fix: iojs/io.js#139
This commit is contained in:
Fedor Indutny 2014-12-17 20:30:04 +07:00
parent 165b70f146
commit 0e19476595
775 changed files with 41 additions and 78 deletions

View File

@ -90,15 +90,18 @@ distclean:
-rm -rf node_modules
test: all
$(PYTHON) tools/test.py --mode=release simple message
$(PYTHON) tools/test.py --mode=release message parallel sequential
$(MAKE) jslint
$(MAKE) cpplint
test-parallel: all
$(PYTHON) tools/test.py --mode=release parallel -J
test-http1: all
$(PYTHON) tools/test.py --mode=release --use-http1 simple message
$(PYTHON) tools/test.py --mode=release --use-http1 sequential parallel message
test-valgrind: all
$(PYTHON) tools/test.py --mode=release --valgrind simple message
$(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message
test/gc/node_modules/weak/build/Release/weakref.node:
@if [ ! -f $(NODE_EXE) ]; then make all; fi
@ -141,7 +144,7 @@ test-message: test-build
$(PYTHON) tools/test.py message
test-simple: all
$(PYTHON) tools/test.py simple
$(PYTHON) tools/test.py parallel sequential
test-pummel: all wrk
$(PYTHON) tools/test.py pummel

View File

@ -22,6 +22,7 @@
var assert = require('assert');
var net = require('net');
var util = require('util');
var common = require('../common');
var revivals = 0;
var deaths = 0;
@ -49,7 +50,7 @@ function tryTimer() {
function tryListen() {
console.log('create a server');
net.createServer()
.listen(0)
.listen(common.PORT)
.on('listening', function() {
revivals++;
this.close();

View File

@ -73,7 +73,7 @@ child.exec(nodejs + ' --eval "require(\'' + filename + '\')"',
});
// module path resolve bug, regression test
child.exec(nodejs + ' --eval "require(\'./test/simple/test-cli-eval.js\')"',
child.exec(nodejs + ' --eval "require(\'./test/parallel/test-cli-eval.js\')"',
function(status, stdout, stderr) {
assert.equal(status.code, 42);
});

View File

@ -22,6 +22,7 @@
var assert = require('assert');
var cluster = require('cluster')
var net = require('net');
var common = require('../common');
var destroyed;
var success;
@ -53,7 +54,7 @@ if (cluster.isMaster) {
success = true;
});
}).listen(0, function() {
}).listen(common.PORT, function() {
var port = this.address().port;
worker = cluster.fork()

Some files were not shown because too many files have changed in this diff Show More