llvm.org GIT mirror llvm / d8ffa5f
[lit] Remove --single-process option (use -j1 instead) Remove `--single-process` command line option. Use `-j1` instead. Also see commit: 96adb78b120b6aa9739eb714534dc8e819f7bc52 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354073 91177308-0d34-0410-b5e6-96231b3b80d8 Julian Lettner 6 months ago
2 changed file(s) with 4 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
320320 debug_group.add_argument("--show-tests", dest="showTests",
321321 help="Show all discovered tests",
322322 action="store_true", default=False)
323 debug_group.add_argument("--single-process", dest="singleProcess",
324 help="Don't run tests in parallel. Intended for debugging "
325 "single test failures",
326 action="store_true", default=False)
327323
328324 opts = parser.parse_args()
329325 args = opts.test_paths
335331 if not args:
336332 parser.error('No inputs specified')
337333
338 if opts.numThreads is not None and opts.numThreads <= 0:
334 if opts.numThreads is None:
335 opts.numThreads = lit.util.detectCPUs()
336 elif opts.numThreads <= 0:
339337 parser.error("Option '--threads' or '-j' requires positive integer")
340338
341339 if opts.maxFailures is not None and opts.maxFailures <= 0:
478476 # Finally limit the number of tests, if desired.
479477 if opts.maxTests is not None:
480478 run.tests = run.tests[:opts.maxTests]
481
482 # Determine number of workers to use.
483 if opts.singleProcess:
484 opts.numThreads = 1
485 elif opts.numThreads is None:
486 opts.numThreads = lit.util.detectCPUs()
487479
488480 # Don't create more threads than tests.
489481 opts.numThreads = min(len(run.tests), opts.numThreads)
2828 # RUN: %{python} %{inputs}/config-map-discovery/driver.py \
2929 # RUN: %{inputs}/config-map-discovery/main-config/lit.cfg \
3030 # RUN: %{inputs}/config-map-discovery/lit.alt.cfg \
31 # RUN: --single-process --debug --show-tests --show-suites > %t.out 2> %t.err
31 # RUN: --threads=1 --debug --show-tests --show-suites > %t.out 2> %t.err
3232 # RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-OUT < %t.out %s
3333 # RUN: FileCheck --check-prefix=CHECK-CONFIG-MAP-ERR < %t.err %s
3434