Skip to content

Commit

Permalink
compiletest: clarify COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS error
Browse files Browse the repository at this point in the history
also improve wording for an ignore reason
  • Loading branch information
RalfJung committed May 29, 2024
1 parent 5870f1c commit 3c61b9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ fi
# Unless we're using an older version of LLVM, check that all LLVM components
# used by tests are available.
if [ "$IS_NOT_LATEST_LLVM" = "" ]; then
export COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS=1
export COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS=1
fi

if [ "$ENABLE_GCC_CODEGEN" = "1" ]; then
Expand Down
9 changes: 6 additions & 3 deletions src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ pub fn make_test_description<R: Read>(
if config.target == "wasm32-unknown-unknown" {
if config.parse_name_directive(ln, directives::CHECK_RUN_RESULTS) {
decision!(IgnoreDecision::Ignore {
reason: "ignored when checking the run results on WASM".into(),
reason: "ignored on WASM as the run results cannot be checked there".into(),
});
}
}
Expand Down Expand Up @@ -1577,8 +1577,11 @@ fn ignore_llvm(config: &Config, line: &str) -> IgnoreDecision {
.split_whitespace()
.find(|needed_component| !components.contains(needed_component))
{
if env::var_os("COMPILETEST_NEEDS_ALL_LLVM_COMPONENTS").is_some() {
panic!("missing LLVM component: {}", missing_component);
if env::var_os("COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS").is_some() {
panic!(
"missing LLVM component {}, and COMPILETEST_REQUIRE_ALL_LLVM_COMPONENTS is set",
missing_component
);
}
return IgnoreDecision::Ignore {
reason: format!("ignored when the {missing_component} LLVM component is missing"),
Expand Down

0 comments on commit 3c61b9b

Please sign in to comment.