@@ -11,6 +11,8 @@ struct Test {
11
11
packages : & ' static [ & ' static str ] ,
12
12
features : Option < & ' static [ & ' static str ] > ,
13
13
manifest_path : Option < & ' static str > ,
14
+ /// `filters` are passed to libtest (i.e., after a `--` in the `cargo test` invocation).
15
+ filters : & ' static [ & ' static str ] ,
14
16
}
15
17
16
18
const TEST_REPOS : & [ Test ] = & [
@@ -22,6 +24,7 @@ const TEST_REPOS: &[Test] = &[
22
24
packages : & [ ] ,
23
25
features : None ,
24
26
manifest_path : None ,
27
+ filters : & [ ] ,
25
28
} ,
26
29
Test {
27
30
name : "ripgrep" ,
@@ -31,6 +34,7 @@ const TEST_REPOS: &[Test] = &[
31
34
packages : & [ ] ,
32
35
features : None ,
33
36
manifest_path : None ,
37
+ filters : & [ ] ,
34
38
} ,
35
39
Test {
36
40
name : "tokei" ,
@@ -40,6 +44,7 @@ const TEST_REPOS: &[Test] = &[
40
44
packages : & [ ] ,
41
45
features : None ,
42
46
manifest_path : None ,
47
+ filters : & [ ] ,
43
48
} ,
44
49
Test {
45
50
name : "xsv" ,
@@ -49,6 +54,21 @@ const TEST_REPOS: &[Test] = &[
49
54
packages : & [ ] ,
50
55
features : None ,
51
56
manifest_path : None ,
57
+ // Many tests here use quickcheck and some of them can fail randomly, so only run deterministic tests.
58
+ filters : & [
59
+ "test_flatten::" ,
60
+ "test_fmt::" ,
61
+ "test_headers::" ,
62
+ "test_index::" ,
63
+ "test_join::" ,
64
+ "test_partition::" ,
65
+ "test_search::" ,
66
+ "test_select::" ,
67
+ "test_slice::" ,
68
+ "test_split::" ,
69
+ "test_stats::" ,
70
+ "test_table::" ,
71
+ ] ,
52
72
} ,
53
73
Test {
54
74
name : "servo" ,
@@ -60,6 +80,7 @@ const TEST_REPOS: &[Test] = &[
60
80
packages : & [ "selectors" ] ,
61
81
features : None ,
62
82
manifest_path : None ,
83
+ filters : & [ ] ,
63
84
} ,
64
85
Test {
65
86
name : "diesel" ,
@@ -75,6 +96,7 @@ const TEST_REPOS: &[Test] = &[
75
96
// not any other crate present in the diesel workspace
76
97
// (This is required to set the feature flags above)
77
98
manifest_path : Some ( "diesel/Cargo.toml" ) ,
99
+ filters : & [ ] ,
78
100
} ,
79
101
] ;
80
102
@@ -97,7 +119,8 @@ fn test_repo(cargo: &Path, out_dir: &Path, test: &Test) {
97
119
if let Some ( lockfile) = test. lock {
98
120
fs:: write ( & dir. join ( "Cargo.lock" ) , lockfile) . unwrap ( ) ;
99
121
}
100
- if !run_cargo_test ( cargo, & dir, test. packages , test. features , test. manifest_path ) {
122
+ if !run_cargo_test ( cargo, & dir, test. packages , test. features , test. manifest_path , test. filters )
123
+ {
101
124
panic ! ( "tests failed for {}" , test. repo) ;
102
125
}
103
126
}
@@ -155,6 +178,7 @@ fn run_cargo_test(
155
178
packages : & [ & str ] ,
156
179
features : Option < & [ & str ] > ,
157
180
manifest_path : Option < & str > ,
181
+ filters : & [ & str ] ,
158
182
) -> bool {
159
183
let mut command = Command :: new ( cargo_path) ;
160
184
command. arg ( "test" ) ;
@@ -174,6 +198,9 @@ fn run_cargo_test(
174
198
command. arg ( "-p" ) . arg ( name) ;
175
199
}
176
200
201
+ command. arg ( "--" ) ;
202
+ command. args ( filters) ;
203
+
177
204
let status = command
178
205
// Disable rust-lang/cargo's cross-compile tests
179
206
. env ( "CFG_DISABLE_CROSS_TESTS" , "1" )
0 commit comments