File tree 2 files changed +12
-2
lines changed
src/tools/compiletest/src
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,23 @@ impl Default for Mode {
78
78
}
79
79
80
80
impl Mode {
81
- pub fn disambiguator ( self ) -> & ' static str {
81
+ pub fn aux_dir_disambiguator ( self ) -> & ' static str {
82
82
// Pretty-printing tests could run concurrently, and if they do,
83
83
// they need to keep their output segregated.
84
84
match self {
85
85
Pretty => ".pretty" ,
86
86
_ => "" ,
87
87
}
88
88
}
89
+
90
+ pub fn output_dir_disambiguator ( self ) -> & ' static str {
91
+ // Coverage tests use the same test files for multiple test modes,
92
+ // so each mode should have a separate output directory.
93
+ match self {
94
+ CoverageMap | RunCoverage => self . to_str ( ) ,
95
+ _ => "" ,
96
+ }
97
+ }
89
98
}
90
99
91
100
string_enum ! {
@@ -699,6 +708,7 @@ pub fn output_testname_unique(
699
708
let mode = config. compare_mode . as_ref ( ) . map_or ( "" , |m| m. to_str ( ) ) ;
700
709
let debugger = config. debugger . as_ref ( ) . map_or ( "" , |m| m. to_str ( ) ) ;
701
710
PathBuf :: from ( & testpaths. file . file_stem ( ) . unwrap ( ) )
711
+ . with_extra_extension ( config. mode . output_dir_disambiguator ( ) )
702
712
. with_extra_extension ( revision. unwrap_or ( "" ) )
703
713
. with_extra_extension ( mode)
704
714
. with_extra_extension ( debugger)
Original file line number Diff line number Diff line change @@ -2720,7 +2720,7 @@ impl<'test> TestCx<'test> {
2720
2720
fn aux_output_dir_name ( & self ) -> PathBuf {
2721
2721
self . output_base_dir ( )
2722
2722
. join ( "auxiliary" )
2723
- . with_extra_extension ( self . config . mode . disambiguator ( ) )
2723
+ . with_extra_extension ( self . config . mode . aux_dir_disambiguator ( ) )
2724
2724
}
2725
2725
2726
2726
/// Generates a unique name for the test, such as `testname.revision.mode`.
You can’t perform that action at this time.
0 commit comments