Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Remove the power to skip tests from opt-dist #135960

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ci/github-actions/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ envs:
# builds)
# - not running `opt-dist`'s post-optimization smoke tests on the resulting toolchain
#
# If you *want* these to happen however, temporarily uncomment it before triggering a try build.
DIST_TRY_BUILD: 1
# If you *want* these to happen however, temporarily comment it before triggering a try build.
# DIST_TRY_BUILD: 1

auto:
<<: *production
Expand Down
6 changes: 0 additions & 6 deletions src/tools/opt-dist/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ pub struct Environment {
artifact_dir: Utf8PathBuf,
/// Path to the host LLVM used to compile LLVM in `src/llvm-project`.
host_llvm_dir: Utf8PathBuf,
/// List of test paths that should be skipped when testing the optimized artifacts.
skipped_tests: Vec<String>,
/// Arguments passed to `rustc-perf --cargo-config <value>` when running benchmarks.
#[builder(default)]
benchmark_cargo_config: Vec<String>,
Expand Down Expand Up @@ -94,10 +92,6 @@ impl Environment {
self.shared_llvm
}

pub fn skipped_tests(&self) -> &[String] {
&self.skipped_tests
}

pub fn benchmark_cargo_config(&self) -> &[String] {
&self.benchmark_cargo_config
}
Expand Down
24 changes: 0 additions & 24 deletions src/tools/opt-dist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ enum EnvironmentCmd {
#[arg(long, default_value_t = false)]
use_bolt: bool,

/// Tests that should be skipped when testing the optimized compiler.
#[arg(long)]
skipped_tests: Vec<String>,

#[clap(flatten)]
shared: SharedArgs,

Expand Down Expand Up @@ -122,7 +118,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
rustc_perf_checkout_dir,
llvm_shared,
use_bolt,
skipped_tests,
benchmark_cargo_config,
shared,
} => {
Expand All @@ -136,7 +131,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
.prebuilt_rustc_perf(rustc_perf_checkout_dir)
.shared_llvm(llvm_shared)
.use_bolt(use_bolt)
.skipped_tests(skipped_tests)
.benchmark_cargo_config(benchmark_cargo_config)
.build()?;

Expand All @@ -148,19 +142,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>

let is_aarch64 = target_triple.starts_with("aarch64");

let mut skip_tests = vec![
// Fails because of linker errors, as of June 2023.
"tests/ui/process/nofile-limit.rs".to_string(),
];

if is_aarch64 {
skip_tests.extend([
// Those tests fail only inside of Docker on aarch64, as of December 2024
"tests/ui/consts/promoted_running_out_of_memory_issue-130687.rs".to_string(),
"tests/ui/consts/large_const_alloc.rs".to_string(),
]);
}

let checkout_dir = Utf8PathBuf::from("/checkout");
let env = EnvironmentBuilder::default()
.host_tuple(target_triple)
Expand All @@ -172,7 +153,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
.shared_llvm(true)
// FIXME: Enable bolt for aarch64 once it's fixed upstream. Broken as of December 2024.
.use_bolt(!is_aarch64)
.skipped_tests(skip_tests)
.build()?;

(env, shared.build_args)
Expand All @@ -191,10 +171,6 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
.build_dir(checkout_dir)
.shared_llvm(false)
.use_bolt(false)
.skipped_tests(vec![
// Fails as of June 2023.
"tests\\codegen\\vec-shrink-panik.rs".to_string(),
])
.build()?;

(env, shared.build_args)
Expand Down
5 changes: 1 addition & 4 deletions src/tools/opt-dist/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ llvm-config = "{llvm_config}"
std::fs::write("config.toml", config_content)?;

let x_py = env.checkout_path().join("x.py");
let mut args = vec![
let args = vec![
env.python_binary(),
x_py.as_str(),
"test",
Expand All @@ -107,9 +107,6 @@ llvm-config = "{llvm_config}"
"tests/ui",
"tests/crashes",
];
for test_path in env.skipped_tests() {
args.extend(["--skip", test_path]);
}
cmd(&args)
.env("COMPILETEST_FORCE_STAGE0", "1")
// Also run dist-only tests
Expand Down
Loading