Skip to content

Commit

Permalink
test(pgo): determine test runnability at compile time
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Nov 30, 2024
1 parent 759ee7c commit c360958
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tests/testsuite/pgo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@ fn llvm_profdata() -> Option<PathBuf> {
}

#[cargo_test]
// macOS may emit different LLVM PGO warnings.
// Windows LLVM has different requirements.
#[cfg_attr(not(target_os = "linux"), ignore = "linux only")]
fn pgo_works() {
if cfg!(not(target_os = "linux")) {
// macOS may emit different LLVM PGO warnings.
// Windows LLVM has different requirements.
return;
}

let Some(llvm_profdata) = llvm_profdata() else {
return;
};
Expand Down

0 comments on commit c360958

Please sign in to comment.