about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-11-03 22:41:15 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-11-03 22:41:15 +0300
commitd588f9338da3f29f03216e2f2685df5b7ad3d0b3 (patch)
treeb1e69fa04552e6d47cc1543e760482d38a1a2592 /src
parent525b81d570b15df2ed5896f0215baea5c64c650c (diff)
downloadrust-d588f9338da3f29f03216e2f2685df5b7ad3d0b3.tar.gz
rust-d588f9338da3f29f03216e2f2685df5b7ad3d0b3.zip
Shorten paths to auxiliary files created by tests
Diffstat (limited to 'src')
-rw-r--r--src/librustc/session/config.rs2
-rw-r--r--src/librustc_trans/back/link.rs2
-rw-r--r--src/test/run-make/extra-filename-with-temp-outputs/Makefile2
-rw-r--r--src/tools/compiletest/src/common.rs14
-rw-r--r--src/tools/compiletest/src/runtest.rs2
5 files changed, 18 insertions, 4 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 0f8312abc3f..8401d493b9d 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -410,7 +410,7 @@ impl_stable_hash_for!(struct self::OutputFilenames {
     outputs
 });
 
-pub const RUST_CGU_EXT: &str = "rust-cgu";
+pub const RUST_CGU_EXT: &str = "rcgu";
 
 impl OutputFilenames {
     pub fn path(&self, flavor: OutputType) -> PathBuf {
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index b203bd640cf..907693ea8a3 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -1222,7 +1222,7 @@ fn add_upstream_rust_crates(cmd: &mut Linker,
                 let canonical = f.replace("-", "_");
                 let canonical_name = name.replace("-", "_");
 
-                // Look for `.rust-cgu.o` at the end of the filename to conclude
+                // Look for `.rcgu.o` at the end of the filename to conclude
                 // that this is a Rust-related object file.
                 fn looks_like_rust(s: &str) -> bool {
                     let path = Path::new(s);
diff --git a/src/test/run-make/extra-filename-with-temp-outputs/Makefile b/src/test/run-make/extra-filename-with-temp-outputs/Makefile
index 13ca397eaf2..6de4f97df0c 100644
--- a/src/test/run-make/extra-filename-with-temp-outputs/Makefile
+++ b/src/test/run-make/extra-filename-with-temp-outputs/Makefile
@@ -2,5 +2,5 @@
 
 all:
 	$(RUSTC) -C extra-filename=bar foo.rs -C save-temps
-	rm $(TMPDIR)/foobar.foo0.rust-cgu.o
+	rm $(TMPDIR)/foobar.foo0.rcgu.o
 	rm $(TMPDIR)/$(call BIN,foobar)
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index aa98f818f40..660462ad419 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -34,6 +34,20 @@ pub enum Mode {
     MirOpt,
 }
 
+impl Mode {
+    pub fn disambiguator(self) -> &'static str {
+        // Run-pass and pretty run-pass tests could run concurrently, and if they do,
+        // they need to keep their output segregated. Same is true for debuginfo tests that
+        // can be run both on gdb and lldb.
+        match self {
+            Pretty => ".pretty",
+            DebugInfoGdb => ".gdb",
+            DebugInfoLldb => ".lldb",
+            _ => "",
+        }
+    }
+}
+
 impl FromStr for Mode {
     type Err = ();
     fn from_str(s: &str) -> Result<Mode, ()> {
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index f8628158aff..17fa19afdd2 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -1565,7 +1565,7 @@ actual:\n\
     fn aux_output_dir_name(&self) -> PathBuf {
         let f = self.output_base_name();
         let mut fname = f.file_name().unwrap().to_os_string();
-        fname.push(&format!(".{}.libaux", self.config.mode));
+        fname.push(&format!("{}.aux", self.config.mode.disambiguator()));
         f.with_file_name(&fname)
     }