Skip to content

Commit

Permalink
Rollup merge of #126257 - Zalathar:needs-matching-clang, r=jieyouxu
Browse files Browse the repository at this point in the history
Rename `needs-matching-clang` to `needs-force-clang-based-tests`

This header is much more restrictive than its old name would suggest. As a result, most of the tests that use it don't actually run in any CI jobs.

Mitigation for #126180, though at some point we still need to go back fix the affected tests to actually run.
  • Loading branch information
jieyouxu authored Jun 11, 2024
2 parents 61207da + 3923b68 commit afce88e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/ci/docker/host-x86_64/x86_64-gnu-debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ ENV RUST_CONFIGURE_ARGS \
# This job appears to be checking two separate things:
# - That we can build the compiler with `--enable-debug`
# (without necessarily testing the result).
# - That the tests with `//@ needs-matching-clang` pass, since they
# - That the tests with `//@ needs-force-clang-based-tests` pass, since they
# don't run by default unless RUSTBUILD_FORCE_CLANG_BASED_TESTS is set.
# - FIXME(https://github.com/rust-lang/rust/pull/126155#issuecomment-2156314273):
# Currently we only run the subset of tests with "clang" in their name.
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,9 +854,9 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[
"needs-asm-support",
"needs-dlltool",
"needs-dynamic-linking",
"needs-force-clang-based-tests",
"needs-git-hash",
"needs-llvm-components",
"needs-matching-clang",
"needs-profiler-support",
"needs-relocation-model-pic",
"needs-run-enabled",
Expand Down
4 changes: 2 additions & 2 deletions src/tools/compiletest/src/header/needs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ pub(super) fn handle_needs(
ignore_reason: "ignored when profiler support is disabled",
},
Need {
name: "needs-matching-clang",
name: "needs-force-clang-based-tests",
condition: config.run_clang_based_tests_with.is_some(),
ignore_reason: "ignored when the used clang does not match the built LLVM",
ignore_reason: "ignored when RUSTBUILD_FORCE_CLANG_BASED_TESTS is not set",
},
Need {
name: "needs-xray",
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/cross-lang-lto-clang/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# needs-matching-clang
# needs-force-clang-based-tests

# This test makes sure that cross-language inlining actually works by checking
# the generated machine code.
Expand Down
5 changes: 4 additions & 1 deletion tests/run-make/cross-lang-lto-pgo-smoketest/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# needs-matching-clang
# needs-force-clang-based-tests

# FIXME(#126180): This test doesn't actually run anywhere, because the only
# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.

# This test makes sure that cross-language inlining can be used in conjunction
# with profile-guided optimization. The test only tests that the whole workflow
Expand Down
5 changes: 4 additions & 1 deletion tests/run-make/cross-lang-lto-riscv-abi/rmake.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
//! Make sure that cross-language LTO works on riscv targets,
//! which requires extra `target-abi` metadata to be emitted.
//@ needs-matching-clang
//@ needs-force-clang-based-tests
//@ needs-llvm-components riscv

// FIXME(#126180): This test doesn't actually run anywhere, because the only
// CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.

use run_make_support::{bin_name, clang, llvm_readobj, rustc};
use std::{
env,
Expand Down
5 changes: 4 additions & 1 deletion tests/run-make/issue-84395-lto-embed-bitcode/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# needs-matching-clang
# needs-force-clang-based-tests

# FIXME(#126180): This test doesn't actually run anywhere, because the only
# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.

# This test makes sure the embed bitcode in elf created with
# lto-embed-bitcode=optimized is valid llvm BC module.
Expand Down
5 changes: 4 additions & 1 deletion tests/run-make/wasm-override-linker/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# needs-matching-clang
# needs-force-clang-based-tests

# FIXME(#126180): This test doesn't actually run anywhere, because the only
# CI job that sets RUSTBUILD_FORCE_CLANG_BASED_TESTS runs very few tests.

include ../tools.mk

Expand Down

0 comments on commit afce88e

Please sign in to comment.