diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-24 14:10:30 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-24 14:10:30 -0700 |
| commit | 30f8621386776bfa658041c971932840d769f394 (patch) | |
| tree | 8b9aa71b0e7fa01451cf9aa1844b974f3adc7d4f | |
| parent | ac9481a438d2fa5000058b0f59b9cd6113f886ce (diff) | |
| parent | 3da7c8f7e11952df0737a1578b87b626a5f4b05a (diff) | |
| download | rust-30f8621386776bfa658041c971932840d769f394.tar.gz rust-30f8621386776bfa658041c971932840d769f394.zip | |
Merge remote-tracking branch 'brson/shorttestnames' into HEAD
| -rw-r--r-- | src/compiletest/compiletest.rc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/compiletest/compiletest.rc b/src/compiletest/compiletest.rc index e8876c4851b..527e472b0b7 100644 --- a/src/compiletest/compiletest.rc +++ b/src/compiletest/compiletest.rc @@ -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 { |
