Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change default number of threads for testsuite

Set default value to the number of CPUs in the system.
  • Loading branch information...
commit 0ffc2d80050fbd3d3040356205307ef0e167d148 1 parent f5d2dda
Ilias Tsitsimpis iliastsi authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 testsuite/runtests.py
9 testsuite/runtests.py
View
@@ -6,7 +6,7 @@
import glob
import subprocess
from ctypes import c_int
-from multiprocessing import Process, Lock, Value, BoundedSemaphore
+from multiprocessing import Process, Lock, Value, BoundedSemaphore, cpu_count
#---------------------------------------------------------------------
@@ -175,10 +175,13 @@ def ignoreLine(line):
else:
tests = glob.glob(dirname + "/suites/*/src/*")
-# How many threads we want (default 4)
+# How many threads we want (default, number of CPUs in the system)
threads = os.getenv("THREADS", "")
if threads == "":
- threads = "4"
+ try:
+ threads = str(cpu_count())
+ except:
+ threads = "4"
# Print header
print "Concuerror's Testsuite (%d threads)\n" % int(threads)
Please sign in to comment.
Something went wrong with that request. Please try again.