Changeset d142ec5
- Timestamp:
- May 18, 2018, 3:59:52 PM (6 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:
- 2472a19, ccdab45
- Parents:
- c7d8100c
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/pybin/tools.py
rc7d8100c rd142ec5 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 -
src/tests/test.py
rc7d8100c rd142ec5 96 96 parser.add_argument('--all', help='Run all test available', action='store_true') 97 97 parser.add_argument('--regenerate-expected', help='Regenerate the .expect by running the specified tets, can be used with --all option', action='store_true') 98 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int , default='8')98 parser.add_argument('-j', '--jobs', help='Number of tests to run simultaneously', type=int) 99 99 parser.add_argument('--list-comp', help='List all valide arguments', action='store_true') 100 100 parser.add_argument('-I','--include', help='Directory of test to include, can be used multiple time, All if omitted', action='append')
Note: See TracChangeset
for help on using the changeset viewer.