@@ -116,6 +116,13 @@ def processCLIArgs():
116116 action = "store_true" ,
117117 help = "Don't run tests, just try to make them." ,
118118 )
119+ parser .add_argument (
120+ "-t" ,
121+ "--test-only" ,
122+ dest = "test_only" ,
123+ action = "store_true" ,
124+ help = "Don't make tests, just try to run them (must already be made)." ,
125+ )
119126 parser .add_argument (
120127 "--run-all" ,
121128 dest = "run_all" ,
@@ -405,20 +412,21 @@ def main():
405412 if inputs .changed :
406413 tests = findChangedTests (inputs .debug )
407414 else :
408- # pass 0: generate all auto-generated tests
409- if any ("test/prob" in arg for arg in inputs .tests ):
410- generateTests (inputs .j )
411-
412- if inputs .do_jumbo :
413- jumboFiles = generateJumboTests (inputs .tests )
414- if inputs .e == - 1 :
415- if inputs .j == 1 :
416- num_expr_test_files = 1
415+ if not inputs .test_only :
416+ # pass 0: generate all auto-generated tests
417+ if any ("test/prob" in arg for arg in inputs .tests ):
418+ generateTests (inputs .j )
419+
420+ if inputs .do_jumbo :
421+ jumboFiles = generateJumboTests (inputs .tests )
422+ if inputs .e == - 1 :
423+ if inputs .j == 1 :
424+ num_expr_test_files = 1
425+ else :
426+ num_expr_test_files = inputs .j * 4
417427 else :
418- num_expr_test_files = inputs .j * 4
419- else :
420- num_expr_test_files = inputs .e
421- handleExpressionTests (inputs .tests , inputs .only_functions , num_expr_test_files )
428+ num_expr_test_files = inputs .e
429+ handleExpressionTests (inputs .tests , inputs .only_functions , num_expr_test_files )
422430
423431 tests = findTests (inputs .tests , inputs .f , inputs .do_jumbo )
424432
@@ -431,10 +439,11 @@ def main():
431439
432440 try :
433441 # pass 1: make test executables
434- for batch in batched (tests ):
435- if inputs .debug :
436- print ("Test batch: " , batch )
437- makeTest (" " .join (batch ), inputs .j )
442+ if not inputs .test_only :
443+ for batch in batched (tests ):
444+ if inputs .debug :
445+ print ("Test batch: " , batch )
446+ makeTest (" " .join (batch ), inputs .j )
438447 if not inputs .make_only :
439448 # pass 2: run test targets
440449 for t in tests :
0 commit comments