@@ -1319,6 +1319,8 @@ host_test!(RunMakeFullDeps {
13191319
13201320default_test ! ( Assembly { path: "tests/assembly" , mode: "assembly" , suite: "assembly" } ) ;
13211321
1322+ host_test ! ( RunCoverage { path: "tests/run-coverage" , mode: "run-coverage" , suite: "run-coverage" } ) ;
1323+
13221324// For the mir-opt suite we do not use macros, as we need custom behavior when blessing.
13231325#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
13241326pub struct MirOpt {
@@ -1516,7 +1518,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
15161518 . arg ( builder. ensure ( tool:: JsonDocLint { compiler : json_compiler, target } ) ) ;
15171519 }
15181520
1519- if mode == "run-make" {
1521+ if mode == "run-make" || mode == "run-coverage" {
15201522 let rust_demangler = builder
15211523 . ensure ( tool:: RustDemangler {
15221524 compiler,
@@ -1703,17 +1705,21 @@ note: if you're sure you want to do this, please open an issue as to why. In the
17031705 add_link_lib_path ( vec ! [ llvm_libdir. trim( ) . into( ) ] , & mut cmd) ;
17041706 }
17051707
1706- // Only pass correct values for these flags for the `run-make` suite as it
1707- // requires that a C++ compiler was configured which isn't always the case.
1708- if !builder . config . dry_run ( ) && matches ! ( suite , "run-make" | "run-make-fulldeps" ) {
1708+ if !builder . config . dry_run ( )
1709+ && ( matches ! ( suite , "run-make" | "run-make-fulldeps" ) || mode == "run-coverage" )
1710+ {
17091711 // The llvm/bin directory contains many useful cross-platform
17101712 // tools. Pass the path to run-make tests so they can use them.
1713+ // (The run-coverage tests also need these tools to process
1714+ // coverage reports.)
17111715 let llvm_bin_path = llvm_config
17121716 . parent ( )
17131717 . expect ( "Expected llvm-config to be contained in directory" ) ;
17141718 assert ! ( llvm_bin_path. is_dir( ) ) ;
17151719 cmd. arg ( "--llvm-bin-dir" ) . arg ( llvm_bin_path) ;
1720+ }
17161721
1722+ if !builder. config . dry_run ( ) && matches ! ( suite, "run-make" | "run-make-fulldeps" ) {
17171723 // If LLD is available, add it to the PATH
17181724 if builder. config . lld_enabled {
17191725 let lld_install_root =
0 commit comments