Skip to content

Commit c360958

Browse files
committed
test(pgo): determine test runnability at compile time
1 parent 759ee7c commit c360958

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/testsuite/pgo.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,10 @@ fn llvm_profdata() -> Option<PathBuf> {
2323
}
2424

2525
#[cargo_test]
26+
// macOS may emit different LLVM PGO warnings.
27+
// Windows LLVM has different requirements.
28+
#[cfg_attr(not(target_os = "linux"), ignore = "linux only")]
2629
fn pgo_works() {
27-
if cfg!(not(target_os = "linux")) {
28-
// macOS may emit different LLVM PGO warnings.
29-
// Windows LLVM has different requirements.
30-
return;
31-
}
32-
3330
let Some(llvm_profdata) = llvm_profdata() else {
3431
return;
3532
};

0 commit comments

Comments
 (0)