From b8473de7b9309b750fdfafa8f40f3e7302e056f3 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sat, 12 May 2018 22:18:55 -0700 Subject: [PATCH] Fix running multiple targets. The aux dir, which previously had the `stage_id` embedded in it, was picking up remnants from previous runs. --- src/tools/compiletest/src/runtest.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 2a76113460fc7..59d94e1fa51e1 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -1476,12 +1476,13 @@ impl<'test> TestCx<'test> { } fn compose_and_run_compiler(&self, mut rustc: Command, input: Option) -> ProcRes { + let aux_dir = self.aux_output_dir_name(); + if !self.props.aux_builds.is_empty() { - create_dir_all(&self.aux_output_dir_name()).unwrap(); + let _ = fs::remove_dir_all(&aux_dir); + create_dir_all(&aux_dir).unwrap(); } - let aux_dir = self.aux_output_dir_name(); - for rel_ab in &self.props.aux_builds { let aux_testpaths = self.compute_aux_test_paths(rel_ab); let aux_props =