Skip to content

Commit 6dc81de

Browse files
committed
Auto merge of #51712 - SLaabsDev:master, r=Mark-Simulacrum
Add support for current directory prefixes (#51071) Fixes #51071
2 parents f968633 + 475405b commit 6dc81de

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/bootstrap/builder.rs

+6
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ impl StepDescription {
218218
}
219219
} else {
220220
for path in paths {
221+
// strip CurDir prefix if present
222+
let path = match path.strip_prefix(".") {
223+
Ok(p) => p,
224+
Err(_) => path,
225+
};
226+
221227
let mut attempted_run = false;
222228
for (desc, should_run) in v.iter().zip(&should_runs) {
223229
if let Some(suite) = should_run.is_suite_path(path) {

src/bootstrap/test.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1074,6 +1074,12 @@ impl Step for Compiletest {
10741074
// Get test-args by striping suite path
10751075
let mut test_args: Vec<&str> = paths
10761076
.iter()
1077+
.map(|p| {
1078+
match p.strip_prefix(".") {
1079+
Ok(path) => path,
1080+
Err(_) => p,
1081+
}
1082+
})
10771083
.filter(|p| p.starts_with(suite_path) && p.is_file())
10781084
.map(|p| p.strip_prefix(suite_path).unwrap().to_str().unwrap())
10791085
.collect();

0 commit comments

Comments
 (0)