summaryrefslogtreecommitdiffstats
path: root/runtest.py
diff options
context:
space:
mode:
authorAndrew Featherstone <andrew.featherstone@gmail.com>2017-12-20 16:36:22 (GMT)
committerAndrew Featherstone <andrew.featherstone@gmail.com>2017-12-20 16:36:22 (GMT)
commit34d627e24d4a5ff609492b930a58881f6918d249 (patch)
tree26ece9856515f9f370240cd0a6b08a6857256ed1 /runtest.py
parent7670917c366a1faa7b383f10b13991dda2b10856 (diff)
downloadSCons-34d627e24d4a5ff609492b930a58881f6918d249.zip
SCons-34d627e24d4a5ff609492b930a58881f6918d249.tar.gz
SCons-34d627e24d4a5ff609492b930a58881f6918d249.tar.bz2
Threading module should definitely be present. Don't try and soldier on without it.
Diffstat (limited to 'runtest.py')
-rwxr-xr-xruntest.py21
1 files changed, 6 insertions, 15 deletions
diff --git a/runtest.py b/runtest.py
index 487100b..99e1d6b 100755
--- a/runtest.py
+++ b/runtest.py
@@ -88,17 +88,11 @@ import stat
import sys
import time
-try:
- import threading
- try: # python3
- from queue import Queue
- except ImportError as e: # python2
- from Queue import Queue
- threading_ok = True
-except ImportError:
- print("Can't import threading or queue")
- threading_ok = False
-
+import threading
+try: # python3
+ from queue import Queue
+except ImportError as e: # python2
+ from Queue import Queue
import subprocess
@@ -850,7 +844,7 @@ class RunTest(threading.Thread):
run_test(t, io_lock, True)
self.queue.task_done()
-if jobs > 1 and threading_ok:
+if jobs > 1:
print("Running tests using %d jobs"%jobs)
# Start worker threads
queue = Queue()
@@ -864,9 +858,6 @@ if jobs > 1 and threading_ok:
queue.put(t)
queue.join()
else:
- # Run tests serially
- if jobs > 1:
- print("Ignoring -j%d option; no python threading module available."%jobs)
for t in tests:
run_test(t, None, False)