Skip to content

Commit

Permalink
Move coverage tests from run-make-fulldeps to run-make
Browse files Browse the repository at this point in the history
Fixes: rust-lang#83830

The first commit was migrated from another PR that failed because CI had
errors likely resulting from trying to run the coverage tests in
run-make. (See: rust-lang#84797 (comment))

So moving the tests should be done as it's own separate PR.

To attempt to resolve those CI errors, this PR also updates bootstrap to
add LLVM library link path to run-make.

When moving coverage tests from run-make-fulldeps to run-make,
some targets failed in CI with an obscure message:

failed to execute command: "musl-g++" "-ffunction-sections"
"-fdata-sections" "-fPIC" "-m32" "-march=i686" "-Wl,-melf_i386"
"-static" "-Wa,-mrelax-relocations=no" "-print-file-name=libstdc++.a"

error: No such file or directory (os error 2)

The coverage tests include # needs-profiler-support and these are the
first run-make tests to require it (as far as I can tell).

There is a special case in bootstrap for adding the LLVM library link
path, and it applies to run-make-fulldeps. This commit adds it for
run-make as well.
  • Loading branch information
richkadel committed May 7, 2021
1 parent ca712bc commit 3e05c09
Show file tree
Hide file tree
Showing 90 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
.arg(builder.ensure(tool::JsonDocCk { compiler: json_compiler, target }));
}

if mode == "run-make" && suite.ends_with("fulldeps") {
if mode == "run-make" && !suite.ends_with("fulldeps") {
let rust_demangler = builder
.ensure(tool::RustDemangler { compiler, target, extra_features: Vec::new() })
.expect("in-tree tool");
Expand Down
3 changes: 0 additions & 3 deletions src/test/run-make-fulldeps/coverage/compiletest-ignore-dir

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/run-make-fulldeps/coverage/coverage_tools.mk

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions src/test/run-make/coverage/compiletest-ignore-dir
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Directory "coverage" supports the tests at prefix ../coverage-*

# Use ./x.py [options] test src/test/run-make/coverage to run all related tests.
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions src/test/run-make/coverage/coverage_tools.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Common Makefile include for Rust `run-make/coverage-* tests. Include this
# file with the line:
#
# -include ../coverage/coverage_tools.mk

-include ../../run-make-fulldeps/tools.mk
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3e05c09

Please sign in to comment.