@@ -91,6 +91,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
91
91
)
92
92
. optopt ( "" , "run" , "whether to execute run-* tests" , "auto | always | never" )
93
93
. optflag ( "" , "ignored" , "run tests marked as ignored" )
94
+ . optmulti ( "" , "skip" , "skip tests matching SUBSTRING. Can be passed multiple times" , "SUBSTRING" )
94
95
. optflag ( "" , "exact" , "filters match exactly" )
95
96
. optopt (
96
97
"" ,
@@ -236,6 +237,7 @@ pub fn parse_config(args: Vec<String>) -> Config {
236
237
debugger : None ,
237
238
run_ignored,
238
239
filters : matches. free . clone ( ) ,
240
+ skip : matches. opt_strs ( "skip" ) ,
239
241
filter_exact : matches. opt_present ( "exact" ) ,
240
242
force_pass_mode : matches. opt_str ( "pass" ) . map ( |mode| {
241
243
mode. parse :: < PassMode > ( )
@@ -312,6 +314,7 @@ pub fn log_config(config: &Config) {
312
314
logv ( c, format ! ( "mode: {}" , config. mode) ) ;
313
315
logv ( c, format ! ( "run_ignored: {}" , config. run_ignored) ) ;
314
316
logv ( c, format ! ( "filters: {:?}" , config. filters) ) ;
317
+ logv ( c, format ! ( "skip: {:?}" , config. skip) ) ;
315
318
logv ( c, format ! ( "filter_exact: {}" , config. filter_exact) ) ;
316
319
logv (
317
320
c,
@@ -506,7 +509,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
506
509
shuffle : false ,
507
510
shuffle_seed : None ,
508
511
test_threads : None ,
509
- skip : vec ! [ ] ,
512
+ skip : config . skip . clone ( ) ,
510
513
list : false ,
511
514
options : test:: Options :: new ( ) ,
512
515
time_options : None ,
@@ -595,6 +598,7 @@ fn collect_tests_from_dir(
595
598
debug ! ( "found test file: {:?}" , file_path. display( ) ) ;
596
599
let paths =
597
600
TestPaths { file : file_path, relative_dir : relative_dir_path. to_path_buf ( ) } ;
601
+
598
602
tests. extend ( make_test ( config, & paths, inputs) )
599
603
} else if file_path. is_dir ( ) {
600
604
let relative_file_path = relative_dir_path. join ( file. file_name ( ) ) ;
0 commit comments