Changeset 21bdce2 for src/tests/pybin/tools.py
- Timestamp:
- May 21, 2018, 10:52:15 PM (7 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, with_gc
- Children:
- 2f0a0678
- Parents:
- b12c036 (diff), 1596726 (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/pybin/tools.py
rb12c036 r21bdce2 168 168 def jobCount( options, tests ): 169 169 # check if the user already passed in a number of jobs for multi-threading 170 make_flags = os.environ.get('MAKEFLAGS') 171 make_jobs_fds = re.search("--jobserver-(auth|fds)=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None 172 if make_jobs_fds : 173 tokens = os.read(int(make_jobs_fds.group(2)), 1024) 174 options.jobs = len(tokens) 175 os.write(int(make_jobs_fds.group(3)), tokens) 170 if not options.jobs: 171 make_flags = os.environ.get('MAKEFLAGS') 172 force = bool(make_flags) 173 make_jobs_fds = re.search("--jobserver-(auth|fds)=\s*([0-9]+),([0-9]+)", make_flags) if make_flags else None 174 if make_jobs_fds : 175 tokens = os.read(int(make_jobs_fds.group(2)), 1024) 176 options.jobs = len(tokens) 177 os.write(int(make_jobs_fds.group(3)), tokens) 178 else : 179 options.jobs = multiprocessing.cpu_count() 176 180 else : 177 options.jobs = multiprocessing.cpu_count()181 force = True 178 182 179 183 # make sure we have a valid number of jobs that corresponds to user input … … 182 186 sys.exit(1) 183 187 184 return min( options.jobs, len(tests) ), True if make_flags else False188 return min( options.jobs, len(tests) ), force 185 189 186 190 # setup a proper processor pool with correct signal handling
Note:
See TracChangeset
for help on using the changeset viewer.