Skip to content

Commit

Permalink
Auto merge of #7142 - alexcrichton:disable-nightly, r=Eh2406
Browse files Browse the repository at this point in the history
Add a way to disable all nightly tests

One thing I'm realizing now is that we test a number of nightly features
of Cargo/rustc, but if they change in rustc then because
rust-lang/rust's CI run's Cargo's tests it could prevent those changes
from landing! The purpose of running Cargo's tests in CI in
rust-lang/rust is to ensure that Cargo generally works, but there's no
need to test the nightly features as that's Cargo's job.

As a result this adds an environment variable that will be set from
rust-lang/rust's CI which will disable these tests.
  • Loading branch information
bors committed Jul 17, 2019
2 parents e3563db + d78990b commit 49e4af0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/testsuite/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,9 @@ pub fn rustc_host() -> String {
}

pub fn is_nightly() -> bool {
RUSTC.with(|r| r.verbose_version.contains("-nightly") || r.verbose_version.contains("-dev"))
env::var("CARGO_TEST_DIABLE_NIGHTLY").is_err()
&& RUSTC
.with(|r| r.verbose_version.contains("-nightly") || r.verbose_version.contains("-dev"))
}

pub fn process<T: AsRef<OsStr>>(t: T) -> cargo::util::ProcessBuilder {
Expand Down

0 comments on commit 49e4af0

Please sign in to comment.