Run target-applies-to-host tests on stable

This commit is contained in:
Jon Gjengset 2022-02-17 10:10:53 -08:00
parent 86376c8dd4
commit 90a61d183f

View File

@ -411,13 +411,11 @@ fn custom_build_env_var_rustc_linker_host_target() {
// no crate type set => linker never called => build succeeds if and
// only if build.rs succeeds, despite linker binary not existing.
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host --target")
.arg(&target)
.masquerade_as_nightly_cargo()
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_host_target_env() {
@ -448,14 +446,12 @@ fn custom_build_env_var_rustc_linker_host_target_env() {
// no crate type set => linker never called => build succeeds if and
// only if build.rs succeeds, despite linker binary not existing.
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host --target")
.env("CARGO_TARGET_APPLIES_TO_HOST", "false")
.arg(&target)
.masquerade_as_nightly_cargo()
.run();
}
}
#[cargo_test]
fn custom_build_invalid_host_config_feature_flag() {
@ -485,7 +481,6 @@ fn custom_build_invalid_host_config_feature_flag() {
.build();
// build.rs should fail due to -Zhost-config being set without -Ztarget-applies-to-host
if cargo_test_support::is_nightly() {
p.cargo("build -Z host-config --target")
.arg(&target)
.masquerade_as_nightly_cargo()
@ -497,7 +492,6 @@ error: the -Zhost-config flag requires the -Ztarget-applies-to-host flag to be s
)
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_host_target_with_bad_host_config() {
@ -530,7 +524,6 @@ fn custom_build_env_var_rustc_linker_host_target_with_bad_host_config() {
.build();
// build.rs should fail due to bad target linker being set
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host -Z host-config --verbose --target")
.arg(&target)
.masquerade_as_nightly_cargo()
@ -544,7 +537,6 @@ fn custom_build_env_var_rustc_linker_host_target_with_bad_host_config() {
)
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_bad_host() {
@ -576,7 +568,6 @@ fn custom_build_env_var_rustc_linker_bad_host() {
.build();
// build.rs should fail due to bad host linker being set
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host -Z host-config --verbose --target")
.arg(&target)
.masquerade_as_nightly_cargo()
@ -590,7 +581,6 @@ fn custom_build_env_var_rustc_linker_bad_host() {
)
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_bad_host_with_arch() {
@ -624,7 +614,6 @@ fn custom_build_env_var_rustc_linker_bad_host_with_arch() {
.build();
// build.rs should fail due to bad host linker being set
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host -Z host-config --verbose --target")
.arg(&target)
.masquerade_as_nightly_cargo()
@ -638,7 +627,6 @@ fn custom_build_env_var_rustc_linker_bad_host_with_arch() {
)
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_cross_arch_host() {
@ -671,13 +659,11 @@ fn custom_build_env_var_rustc_linker_cross_arch_host() {
.build();
// build.rs should fail due to bad host linker being set
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host -Z host-config --verbose --target")
.arg(&target)
.masquerade_as_nightly_cargo()
.run();
}
}
#[cargo_test]
fn custom_build_env_var_rustc_linker_bad_cross_arch_host() {
@ -712,7 +698,6 @@ fn custom_build_env_var_rustc_linker_bad_cross_arch_host() {
.build();
// build.rs should fail due to bad host linker being set
if cargo_test_support::is_nightly() {
p.cargo("build -Z target-applies-to-host -Z host-config --verbose --target")
.arg(&target)
.masquerade_as_nightly_cargo()
@ -726,7 +711,6 @@ fn custom_build_env_var_rustc_linker_bad_cross_arch_host() {
)
.run();
}
}
#[cargo_test]
fn custom_build_script_wrong_rustc_flags() {