File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
src/tools/compiletest/src Expand file tree Collapse file tree 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 {
7878}
7979
8080impl Mode {
81- pub fn disambiguator ( self ) -> & ' static str {
81+ pub fn aux_dir_disambiguator ( self ) -> & ' static str {
8282 // Pretty-printing tests could run concurrently, and if they do,
8383 // they need to keep their output segregated.
8484 match self {
8585 Pretty => ".pretty" ,
8686 _ => "" ,
8787 }
8888 }
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+ }
8998}
9099
91100string_enum ! {
@@ -699,6 +708,7 @@ pub fn output_testname_unique(
699708 let mode = config. compare_mode . as_ref ( ) . map_or ( "" , |m| m. to_str ( ) ) ;
700709 let debugger = config. debugger . as_ref ( ) . map_or ( "" , |m| m. to_str ( ) ) ;
701710 PathBuf :: from ( & testpaths. file . file_stem ( ) . unwrap ( ) )
711+ . with_extra_extension ( config. mode . output_dir_disambiguator ( ) )
702712 . with_extra_extension ( revision. unwrap_or ( "" ) )
703713 . with_extra_extension ( mode)
704714 . with_extra_extension ( debugger)
Original file line number Diff line number Diff line change @@ -2720,7 +2720,7 @@ impl<'test> TestCx<'test> {
27202720 fn aux_output_dir_name ( & self ) -> PathBuf {
27212721 self . output_base_dir ( )
27222722 . join ( "auxiliary" )
2723- . with_extra_extension ( self . config . mode . disambiguator ( ) )
2723+ . with_extra_extension ( self . config . mode . aux_dir_disambiguator ( ) )
27242724 }
27252725
27262726 /// Generates a unique name for the test, such as `testname.revision.mode`.
You can’t perform that action at this time.
0 commit comments