Skip to content

Commit 97a988e

Browse files
committed
Auto merge of #5870 - bmwill:fix-fetch-target-tests, r=alexcrichton
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 <[email protected]>
2 parents 2b6e996 + 4e13dc7 commit 97a988e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/testsuite/fetch.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ fn no_deps() {
1515

1616
#[test]
1717
fn fetch_all_platform_dependencies_when_no_target_is_given() {
18+
if cross_compile::disabled() {
19+
return;
20+
}
21+
1822
Package::new("d1", "1.2.3")
1923
.file("Cargo.toml", &basic_manifest("d1", "1.2.3"))
2024
.file("src/lib.rs", "")
@@ -60,6 +64,10 @@ fn fetch_all_platform_dependencies_when_no_target_is_given() {
6064

6165
#[test]
6266
fn fetch_platform_specific_dependencies() {
67+
if cross_compile::disabled() {
68+
return;
69+
}
70+
6371
Package::new("d1", "1.2.3")
6472
.file("Cargo.toml", &basic_manifest("d1", "1.2.3"))
6573
.file("src/lib.rs", "")

0 commit comments

Comments
 (0)