Skip to content

Commit

Permalink
add TARGET env var to select target for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
newAM authored and jyn514 committed Nov 5, 2021
1 parent c3e5865 commit 73de1df
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/simple_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ mod simple_project {
remove_all("./tests/simple_project/target2");
assert_doc("./tests/simple_project", &[("CARGO_TARGET_DIR", "target2")]).success();

let target: &str = option_env!("TARGET").unwrap_or("x86_64-unknown-linux-gnu");

remove_all("./tests/simple_project/target");
assert_doc(
"./tests/simple_project",
&[("CARGO_BUILD_TARGET", "x86_64-unknown-linux-gnu")],
)
.success();
assert_doc("./tests/simple_project", &[("CARGO_BUILD_TARGET", target)]).success();

// fn it_shortens_path_on_error
remove_all("./tests/simple_project/target");
Expand Down

0 comments on commit 73de1df

Please sign in to comment.