Merge remote-tracking branch 'brson/shorttestnames' into HEAD

This commit is contained in:
Brian Anderson 2013-06-24 14:10:30 -07:00
commit 30f8621386

View File

@ -254,9 +254,17 @@ pub fn make_test(config: &config, testfile: &Path) -> test::TestDescAndFn {
}
pub fn make_test_name(config: &config, testfile: &Path) -> test::TestName {
// Try to elide redundant long paths
fn shorten(path: &Path) -> ~str {
let filename = path.filename();
let dir = path.pop().filename();
fmt!("%s/%s", dir.get_or_default(~""), filename.get_or_default(~""))
}
test::DynTestName(fmt!("[%s] %s",
mode_str(config.mode),
testfile.to_str()))
shorten(testfile)))
}
pub fn make_test_closure(config: &config, testfile: &Path) -> test::TestFn {