From 7a021c3fa6e4f3bb2abfb08cc5a761e4557ad415 Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Mon, 2 Dec 2024 21:18:14 -0500 Subject: [PATCH] test(pgo): only run on nightly So it won't run on rust-lang/rust's CI because `CARGO_TEST_DISABLE_NIGHTLY` is set on that. See rust-lang/rust 133675 --- tests/testsuite/pgo.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/testsuite/pgo.rs b/tests/testsuite/pgo.rs index a2b369f8846..63aaafbc504 100644 --- a/tests/testsuite/pgo.rs +++ b/tests/testsuite/pgo.rs @@ -22,10 +22,12 @@ fn llvm_profdata() -> Option { }) } -#[cargo_test] +// Rustc build may be without profiling support. +// Mark it as nightly so it won't run on rust-lang/rust CI. +#[cfg_attr(target_os = "linux", cargo_test(nightly, reason = "rust-lang/rust#133675"))] // macOS may emit different LLVM PGO warnings. // Windows LLVM has different requirements. -#[cfg_attr(not(target_os = "linux"), ignore = "linux only")] +#[cfg_attr(not(target_os = "linux"), cargo_test, ignore = "linux only")] fn pgo_works() { let Some(llvm_profdata) = llvm_profdata() else { return;