Skip to content

Commit

Permalink
Auto merge of #5870 - bmwill:fix-fetch-target-tests, r=alexcrichton
Browse files Browse the repository at this point in the history
fetch: skip target tests when cross_compile is disabled

It was reported in #5864 that the fetch-by-target tests fail when run on a non-x86 platform.  This is due to the cross_compile module being disabled when running on non-x86 platforms.  Fix this by skipping the two fetch tests which rely on the cross_compile module, when cross_compile has been disabled.

Signed-off-by: Brandon Williams <bmwill@google.com>
  • Loading branch information
bors committed Aug 6, 2018
2 parents 2b6e996 + 4e13dc7 commit 97a988e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testsuite/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ fn no_deps() {

#[test]
fn fetch_all_platform_dependencies_when_no_target_is_given() {
if cross_compile::disabled() {
return;
}

Package::new("d1", "1.2.3")
.file("Cargo.toml", &basic_manifest("d1", "1.2.3"))
.file("src/lib.rs", "")
Expand Down Expand Up @@ -60,6 +64,10 @@ fn fetch_all_platform_dependencies_when_no_target_is_given() {

#[test]
fn fetch_platform_specific_dependencies() {
if cross_compile::disabled() {
return;
}

Package::new("d1", "1.2.3")
.file("Cargo.toml", &basic_manifest("d1", "1.2.3"))
.file("src/lib.rs", "")
Expand Down

0 comments on commit 97a988e

Please sign in to comment.