test: optionally set common.PORT via env variable
authorTimothy J Fontaine <tjfontaine@gmail.com>
Tue, 26 Feb 2013 06:19:16 +0000 (22:19 -0800)
committerBen Noordhuis <info@bnoordhuis.nl>
Sat, 2 Mar 2013 18:09:39 +0000 (19:09 +0100)
This is a back-port of commit 17a8126 from the master branch.

test/common.js

index 4f96369..ef0ae09 100644 (file)
@@ -26,7 +26,7 @@ exports.testDir = path.dirname(__filename);
 exports.fixturesDir = path.join(exports.testDir, 'fixtures');
 exports.libDir = path.join(exports.testDir, '../lib');
 exports.tmpDir = path.join(exports.testDir, 'tmp');
-exports.PORT = 12346;
+exports.PORT = +process.env.NODE_COMMON_PORT || 12346;
 
 if (process.platform === 'win32') {
   exports.PIPE = '\\\\.\\pipe\\libuv-test';