@@ -274,7 +274,9 @@ def manage_worker(
274274 worker .wait ()
275275
276276
277- def _computeSkipTests (huntrleaks , use_rr = False ) -> Tuple [Set [str ], Set [str ]]:
277+ def _computeSkipTests (
278+ huntrleaks , use_rr = False , extra_skip_files = None
279+ ) -> Tuple [Set [str ], Set [str ]]:
278280 skip_list_files = ["devserver_skip_tests.txt" , "cinder_skip_test.txt" ]
279281
280282 version = "" .join (str (v ) for v in sys .version_info [:2 ])
@@ -288,6 +290,9 @@ def _computeSkipTests(huntrleaks, use_rr=False) -> Tuple[Set[str], Set[str]]:
288290 if use_rr :
289291 skip_list_files .append ("rr_skip_tests.txt" )
290292
293+ if extra_skip_files :
294+ skip_list_files .extend (extra_skip_files )
295+
291296 try :
292297 import cinderjit # noqa: F401
293298
@@ -354,8 +359,10 @@ def _select_tests(exclude: Set[str]) -> List[str]:
354359 return tests
355360
356361
357- def list_tests (huntrleaks , use_rr ):
358- skip_modules , skip_patterns = _computeSkipTests (huntrleaks , use_rr )
362+ def list_tests (huntrleaks , use_rr , extra_skip_files = None ):
363+ skip_modules , skip_patterns = _computeSkipTests (
364+ huntrleaks , use_rr , extra_skip_files
365+ )
359366
360367 return _select_tests (skip_modules )
361368
@@ -376,6 +383,7 @@ def __init__(
376383 json_summary_file : str | None ,
377384 failfast : bool ,
378385 expected_failures : list [str ],
386+ skip_lists : list [str ] | None = None ,
379387 ):
380388 self ._cinder_regr_runner_logfile = logfile
381389 self ._success_on_test_errors = success_on_test_errors
@@ -403,7 +411,9 @@ def __init__(
403411 # False, False => quiet, pgo
404412 self ._logger = libregrtest_logger .Logger (self ._results , False , False )
405413
406- skip_modules , skip_patterns = _computeSkipTests (self ._huntrleaks , self ._use_rr )
414+ skip_modules , skip_patterns = _computeSkipTests (
415+ self ._huntrleaks , self ._use_rr , skip_lists
416+ )
407417
408418 if tests is None :
409419 tests = _select_tests (skip_modules )
@@ -866,7 +876,7 @@ def worker_main(args):
866876
867877def dispatcher_main (args ):
868878 if args .list :
869- tests = list_tests (args .huntrleaks , args .use_rr )
879+ tests = list_tests (args .huntrleaks , args .use_rr , args . skip_list )
870880 tests .sort ()
871881 print (json .dumps (tests , indent = 0 ))
872882 sys .exit (0 )
@@ -901,6 +911,7 @@ def dispatcher_main(args):
901911 args .json_summary_file ,
902912 args .failfast ,
903913 args .expected_failures ,
914+ args .skip_list ,
904915 )
905916 print (f"Spawning { num_workers } workers" )
906917 test_runner .run ()
@@ -1033,6 +1044,14 @@ def main():
10331044 action = "append" ,
10341045 help = "A file which specifies expected failures for this test run." ,
10351046 )
1047+ dispatcher_parser .add_argument (
1048+ "--skip-list" ,
1049+ action = "append" ,
1050+ help = "A file listing extra tests to skip for this run, in the same "
1051+ "format as the checked-in *_skip_tests.txt files. Use to skip tests "
1052+ "for a specific build configuration (e.g. prefork-model) without "
1053+ "affecting other builds. Can be supplied multiple times." ,
1054+ )
10361055 dispatcher_parser .add_argument ("rest" , nargs = argparse .REMAINDER )
10371056 dispatcher_parser .set_defaults (func = dispatcher_main )
10381057
0 commit comments