diff options
author | Andrew Featherstone <andrew.featherstone@gmail.com> | 2017-12-20 16:36:22 (GMT) |
---|---|---|
committer | Andrew Featherstone <andrew.featherstone@gmail.com> | 2017-12-20 16:36:22 (GMT) |
commit | 34d627e24d4a5ff609492b930a58881f6918d249 (patch) | |
tree | 26ece9856515f9f370240cd0a6b08a6857256ed1 /runtest.py | |
parent | 7670917c366a1faa7b383f10b13991dda2b10856 (diff) | |
download | SCons-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-x | runtest.py | 21 |
1 files changed, 6 insertions, 15 deletions
@@ -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) |