Commit 2e848a5e authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Simplify, and correct, the code for determining whether we should use threads

parent 4a9e2b59
......@@ -89,6 +89,7 @@ for opt,arg in opts:
pat = int(pat)
if (maj, min, pat) >= (2, 5, 2):
config.threads = int(arg)
config.use_threads = 1
else:
print "Warning: Ignoring request to use threads as python version < 2.5.2"
......
......@@ -86,7 +86,7 @@ class TestConfig:
# threads
self.threads = 1
self.use_threads = 1
self.use_threads = 0
global config
config = TestConfig()
......
......@@ -91,8 +91,6 @@ endif
ifneq "$(THREADS)" ""
RUNTEST_OPTS += --threads=$(THREADS)
else
USETHREADS=0
endif
RUNTEST_OPTS += \
......@@ -109,7 +107,6 @@ RUNTEST_OPTS += \
-e config.os=\"$(TargetOS_CPP)\" \
-e config.wordsize=\"$(WORDSIZE)\" \
-e default_testopts.cleanup=\"$(CLEANUP)\" \
-e "if '$(USETHREADS)': config.use_threads=int($(USETHREADS))" \
-e config.timeout="int($(TIMEOUT)) or config.timeout" \
-e config.timeout_prog=\"$(TOP)/timeout/timeout\" \
-e config.exeext=\"$(exeext)\" \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment