Changes in / [7d05e7e:126e54f]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/test.py
r7d05e7e r126e54f 285 285 # check if the user already passed in a number of jobs for multi-threading 286 286 make_flags = environ.get('MAKEFLAGS') 287 make_has_max_jobs = re.search("(-j|--jobs)\s*([0-9]+)", make_flags) if make_flags else None 288 make_max_jobs = make_has_max_jobs.group(2) if make_has_max_jobs else None 289 make_cmd = "make" if make_flags and "-j" in make_flags else "make -j8" 287 make_jobs_fds = re.search("--jobserver-fds=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None 288 if make_jobs_fds : 289 tokens = os.read(int(make_jobs_fds.group(1)), 1024) 290 options.jobs = len(tokens) 291 os.write(int(make_jobs_fds.group(2)), tokens) 290 292 291 293 # make sure we have a valid number of jobs that corresponds to user input 292 options.jobs = int(make_max_jobs) if make_max_jobs else (options.jobs if options.jobs else 1)293 294 if options.jobs <= 0 : 294 295 print('ERROR: Invalid number of jobs', file=sys.stderr) … … 296 297 297 298 print('Running on %i cores' % options.jobs) 299 make_cmd = "make" if make_flags else ("make -j%i" % options.jobs) 298 300 299 301 # users may want to simply list the tests
Note: See TracChangeset
for help on using the changeset viewer.