From 33223fdd76e462456d6364da493b48b968036e6e Mon Sep 17 00:00:00 2001 From: Scott Olson Date: Fri, 16 Dec 2016 23:43:58 -0800 Subject: [PATCH] Allow compiletest to see symlinked targets. --- tests/compiletest.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/compiletest.rs b/tests/compiletest.rs index f7bf16926ba..ff96cf3c680 100644 --- a/tests/compiletest.rs +++ b/tests/compiletest.rs @@ -38,15 +38,8 @@ fn miri_pass(path: &str, target: &str) { fn for_all_targets(sysroot: &str, mut f: F) { for target in std::fs::read_dir(format!("{}/lib/rustlib/", sysroot)).unwrap() { - let target = target.unwrap(); - if !target.metadata().unwrap().is_dir() { - continue; - } - let target = target.file_name().into_string().unwrap(); - match &*target { - "etc" | "src" => continue, - _ => {}, - } + let target = target.unwrap().file_name().into_string().unwrap(); + if !target.contains("-") { continue; } let stderr = std::io::stderr(); writeln!(stderr.lock(), "running tests for target {}", target).unwrap(); f(target);