Skip to content

Commit 7a021c3

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 7a021c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/testsuite/pgo.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ 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(target_os = "linux", cargo_test(nightly, reason = "rust-lang/rust#133675"))]
2628
// macOS may emit different LLVM PGO warnings.
2729
// Windows LLVM has different requirements.
28-
#[cfg_attr(not(target_os = "linux"), ignore = "linux only")]
30+
#[cfg_attr(not(target_os = "linux"), cargo_test, ignore = "linux only")]
2931
fn pgo_works() {
3032
let Some(llvm_profdata) = llvm_profdata() else {
3133
return;

0 commit comments

Comments
 (0)