Skip to content

Commit 4ee2a0a

Browse files
committed
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
1 parent 99c4fd1 commit 4ee2a0a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/testsuite/pgo.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ fn llvm_profdata() -> Option<PathBuf> {
2222
})
2323
}
2424

25-
#[cargo_test]
25+
// Rustc build may be without profiling support.
26+
// Mark it as nightly so it won't run on rust-lang/rust CI.
27+
#[cfg_attr(
28+
target_os = "linux",
29+
cargo_test(nightly, reason = "rust-lang/rust#133675")
30+
)]
2631
// macOS may emit different LLVM PGO warnings.
2732
// Windows LLVM has different requirements.
28-
#[cfg_attr(not(target_os = "linux"), ignore = "linux only")]
33+
#[cfg_attr(not(target_os = "linux"), cargo_test, ignore = "linux only")]
2934
fn pgo_works() {
3035
let Some(llvm_profdata) = llvm_profdata() else {
3136
return;

0 commit comments

Comments
 (0)