@@ -1319,6 +1319,8 @@ host_test!(RunMakeFullDeps {
1319
1319
1320
1320
default_test ! ( Assembly { path: "tests/assembly" , mode: "assembly" , suite: "assembly" } ) ;
1321
1321
1322
+ host_test ! ( RunCoverage { path: "tests/run-coverage" , mode: "run-coverage" , suite: "run-coverage" } ) ;
1323
+
1322
1324
// For the mir-opt suite we do not use macros, as we need custom behavior when blessing.
1323
1325
#[ derive( Debug , Copy , Clone , PartialEq , Eq , Hash ) ]
1324
1326
pub 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
1516
1518
. arg ( builder. ensure ( tool:: JsonDocLint { compiler : json_compiler, target } ) ) ;
1517
1519
}
1518
1520
1519
- if mode == "run-make" {
1521
+ if mode == "run-make" || mode == "run-coverage" {
1520
1522
let rust_demangler = builder
1521
1523
. ensure ( tool:: RustDemangler {
1522
1524
compiler,
@@ -1703,17 +1705,21 @@ note: if you're sure you want to do this, please open an issue as to why. In the
1703
1705
add_link_lib_path ( vec ! [ llvm_libdir. trim( ) . into( ) ] , & mut cmd) ;
1704
1706
}
1705
1707
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
+ {
1709
1711
// The llvm/bin directory contains many useful cross-platform
1710
1712
// 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.)
1711
1715
let llvm_bin_path = llvm_config
1712
1716
. parent ( )
1713
1717
. expect ( "Expected llvm-config to be contained in directory" ) ;
1714
1718
assert ! ( llvm_bin_path. is_dir( ) ) ;
1715
1719
cmd. arg ( "--llvm-bin-dir" ) . arg ( llvm_bin_path) ;
1720
+ }
1716
1721
1722
+ if !builder. config . dry_run ( ) && matches ! ( suite, "run-make" | "run-make-fulldeps" ) {
1717
1723
// If LLD is available, add it to the PATH
1718
1724
if builder. config . lld_enabled {
1719
1725
let lld_install_root =
0 commit comments