summaryrefslogtreecommitdiff
path: root/tools/test.py
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2017-12-08 18:33:36 -0800
committerRich Trott <rtrott@gmail.com>2017-12-11 19:49:40 -0800
commit800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8 (patch)
treea3aa241a17a17477727595391de16bcdb67aba15 /tools/test.py
parent3674bee884bd86a7eb778345a410b2d8ab473a84 (diff)
downloadandroid-node-v8-800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8.tar.gz
android-node-v8-800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8.tar.bz2
android-node-v8-800ce94e5cdaa8dba7cf69b4c560a66a51ae0ec8.zip
tools,test: throw if common.PORT used in parallel tests
common.PORT should not be used in parallelized tests. (There can be a port collision if another tests requests an arbitrary open port from the operating system and ends up getting common.PORT before a test that uses common.PORT uses the port.) In such a situation, throw an error. PR-URL: https://github.com/nodejs/node/pull/17559 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'tools/test.py')
-rwxr-xr-xtools/test.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/test.py b/tools/test.py
index ccc25f2a88..230774b256 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -532,7 +532,8 @@ class TestCase(object):
try:
result = self.RunCommand(self.GetCommand(), {
- "TEST_THREAD_ID": "%d" % self.thread_id
+ "TEST_THREAD_ID": "%d" % self.thread_id,
+ "TEST_PARALLEL" : "%d" % self.parallel
})
finally:
# Tests can leave the tty in non-blocking mode. If the test runner