Skip to content

Commit 05f54fd

Browse files
authored
test(pgo): only run on nightly (#14887)
### What does this PR try to resolve? Only run PGO test on nightly, so it won't run on rust-lang/rust's CI because `CARGO_TEST_DISABLE_NIGHTLY` is set on that. ### How should we test and review this PR? This is a temporary fix to unblock Cargo submoule update (assume that rust-lang/rust#133675 won't be fixed this week). In the future We should seek a solution that * Disable test on rust-lang/rust's CI * Maximize test coverage on different channels and platforms on Cargo's CI.
2 parents 99c4fd1 + 4ee2a0a commit 05f54fd

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)