Browse Source

Set NUMPROCS minimum value for tests.

When multiprocessing.cpu_count() is 1, NUMPROCS is set to zero and no
processes are started. This change sets the minimum value for NUMPROCS
to 1.
zPlus 3 years ago
parent
commit
9ea9558cf6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      runtests.py

+ 3 - 0
runtests.py

@@ -27,9 +27,12 @@ NUMREMAINING = None
 PRINTLOCK = None
 RUNNING = []
 FAILED = []
+
 NUMPROCS = multiprocessing.cpu_count() - 1
 if os.environ.get("BUILD_ID"):
     NUMPROCS = multiprocessing.cpu_count()
+if NUMPROCS < 1:
+    NUMPROCS = 1
 
 HERE = os.path.join(os.path.dirname(os.path.abspath(__file__)))
 LOG = logging.getLogger(__name__)