Commit 0a14ae0
authored
Rollup merge of rust-lang#146501 - Enselic:x-test-filter, r=Mark-Simulacrum
compiletest: Fix `--exact` test filtering
This fix only changes the behavior when using `--exact` test filtering, which
was quite broken. Before this fix, the following runs 0 tests:
$ ./x test tests/run-make/crate-loading -- --exact
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 431 filtered out; finished in 24.95µs
With the fix the desired test is run:
$ ./x test tests/run-make/crate-loading -- --exact
running 1 tests
test [run-make] tests/run-make/crate-loading ... ok
Without `--exact` the set of run tests is unchanged. This still runs "too many" (cc rust-lang#134341) tests
$ ./x test tests/run-make/crate-loading
running 3 tests
test [run-make] tests/run-make/crate-loading-crate-depends-on-itself ... ok
test [run-make] tests/run-make/crate-loading-multiple-candidates ... ok
test [run-make] tests/run-make/crate-loading ... ok
This still runs the one and only right test
$ ./x test tests/ui/lint/unused/unused-allocation.rs
running 1 tests
test [ui] tests/ui/lint/unused/unused-allocation.rs ... ok
### Notes
- I have not verified this on Windows which treats paths differently (but I see no reason why it should not work since my code should be platform agnostic).File tree
4 files changed
+54
-11
lines changed- src/tools/compiletest/src
- directives
4 files changed
+54
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
| 1449 | + | |
1449 | 1450 | | |
1450 | 1451 | | |
1451 | 1452 | | |
| |||
1520 | 1521 | | |
1521 | 1522 | | |
1522 | 1523 | | |
1523 | | - | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1524 | 1531 | | |
1525 | 1532 | | |
1526 | 1533 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
224 | | - | |
| 226 | + | |
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| |||
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
234 | | - | |
| 236 | + | |
235 | 237 | | |
236 | | - | |
| 238 | + | |
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
296 | | - | |
297 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
339 | 345 | | |
340 | 346 | | |
341 | 347 | | |
| 348 | + | |
342 | 349 | | |
343 | 350 | | |
344 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
323 | | - | |
324 | 328 | | |
| 329 | + | |
| 330 | + | |
325 | 331 | | |
326 | 332 | | |
327 | 333 | | |
328 | 334 | | |
329 | 335 | | |
330 | 336 | | |
331 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
| |||
911 | 923 | | |
912 | 924 | | |
913 | 925 | | |
914 | | - | |
| 926 | + | |
| 927 | + | |
915 | 928 | | |
916 | 929 | | |
917 | 930 | | |
| |||
920 | 933 | | |
921 | 934 | | |
922 | 935 | | |
| 936 | + | |
923 | 937 | | |
924 | 938 | | |
925 | 939 | | |
| |||
1072 | 1086 | | |
1073 | 1087 | | |
1074 | 1088 | | |
1075 | | - | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1076 | 1094 | | |
1077 | 1095 | | |
1078 | 1096 | | |
| |||
1084 | 1102 | | |
1085 | 1103 | | |
1086 | 1104 | | |
1087 | | - | |
| 1105 | + | |
1088 | 1106 | | |
1089 | 1107 | | |
1090 | 1108 | | |
1091 | 1109 | | |
1092 | 1110 | | |
1093 | 1111 | | |
1094 | | - | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1095 | 1122 | | |
1096 | 1123 | | |
1097 | 1124 | | |
| |||
0 commit comments