Changeset 126e54f
- Timestamp:
- Sep 9, 2016, 11:26:50 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 03e3117, b6424d9
- Parents:
- 7d05e7e (diff), 850fda6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - 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.