Skip to content

Commit

Permalink
Fix: avoid potential race in tests/profile.rs
Browse files Browse the repository at this point in the history
... also remove an unnecessary `assert`.
  • Loading branch information
bryango committed Oct 28, 2024
1 parent 734aa15 commit 267b879
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,11 @@ fn bin_default_uses_debug_build() {
}

#[test]
#[serial]
fn bin_ignore_cargo_build_target_in_tests() {
unsafe {
env::set_var("CARGO_BUILD_TARGET", "x86_64-unknown-linux-gnu");
}
assert_eq!(
env::var("CARGO_BUILD_TARGET"),
Ok("x86_64-unknown-linux-gnu".into())
);
// ^ this env var should be ignored:
bin_default_uses_debug_build();
}
Expand Down

0 comments on commit 267b879

Please sign in to comment.