- Timestamp:
- May 18, 2018, 4:00:26 PM (6 years ago)
- Branches:
- new-env, with_gc
- Children:
- 824a2dc
- Parents:
- ff29f08 (diff), d142ec5 (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. - Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/pybin/tools.py
rff29f08 r2472a19 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
rff29f08 r2472a19 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.