|
|
@ -134,13 +134,16 @@ def run_tests(options, datafilename): |
|
|
|
jsonlogfile = open(jsonlogfilename, 'w') |
|
|
|
jsonlogfile = open(jsonlogfilename, 'w') |
|
|
|
logfile.write('Log of Meson test suite run on %s.\n\n' % datetime.datetime.now().isoformat()) |
|
|
|
logfile.write('Log of Meson test suite run on %s.\n\n' % datetime.datetime.now().isoformat()) |
|
|
|
tests = pickle.load(open(datafilename, 'rb')) |
|
|
|
tests = pickle.load(open(datafilename, 'rb')) |
|
|
|
|
|
|
|
if len(tests) == 0: |
|
|
|
|
|
|
|
print('No tests defined.') |
|
|
|
|
|
|
|
return |
|
|
|
numlen = len('%d' % len(tests)) |
|
|
|
numlen = len('%d' % len(tests)) |
|
|
|
varname = 'MESON_TESTTHREADS' |
|
|
|
varname = 'MESON_TESTTHREADS' |
|
|
|
if varname in os.environ: |
|
|
|
if varname in os.environ: |
|
|
|
try: |
|
|
|
try: |
|
|
|
num_workers = int(os.environ[varname]) |
|
|
|
num_workers = int(os.environ[varname]) |
|
|
|
except ValueError: |
|
|
|
except ValueError: |
|
|
|
write_log('Invalid value in %s, using 1 thread.' % varname) |
|
|
|
print('Invalid value in %s, using 1 thread.' % varname) |
|
|
|
num_workers = 1 |
|
|
|
num_workers = 1 |
|
|
|
else: |
|
|
|
else: |
|
|
|
num_workers = multiprocessing.cpu_count() |
|
|
|
num_workers = multiprocessing.cpu_count() |
|
|
|