Changeset 850fda6
- Timestamp:
- Sep 9, 2016, 10:59:53 AM (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:
- 126e54f, 46f1d20
- Parents:
- 4563a95
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/test.py
r4563a95 r850fda6 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.