Rework parallel test process count logic
authorEd Maste <emaste@freebsd.org>
Fri, 21 Nov 2014 02:41:25 +0000 (02:41 +0000)
committerEd Maste <emaste@freebsd.org>
Fri, 21 Nov 2014 02:41:25 +0000 (02:41 +0000)
commitcec2a5b270d3c333873c241750136aec4b0863cd
tree6ae727c22a68109e604c980109e9d796ef842594
parent1f44142e4e65af0b4ac94d307c37df0e873c6e30
Rework parallel test process count logic

The default value for opt.thread_count was multiprocessing.cpu_count(),
which meant the LLDB_TEST_THREADS environment variable was never used.
It's not easy to pass the -t option to the test run when invoking it
from e.g. 'ninja check-lldb', so having the environment variable as an
option is useful.

Change the logic so that the thread count is set by the first one of:

  1. The -t option to test/dosep.py
  2. The LLDB_TEST_THREADS environment variable
  3. The machine's CPU count from multiprocessing.cpu_count()

llvm-svn: 222501
lldb/test/dosep.py