Skip to content

Commit

Permalink
adjust tests for rsutc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 25, 2019
1 parent 1462e72 commit 2634e8f
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions tests/smoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,24 +761,35 @@ fn host_twice() {
}

/// Check multi stage sysroot builds with `xargo test`
// We avoid Windows here just because it would be tricky to modify the rust-src
// component (cf. #36501) from within the appveyor environment
#[cfg(feature = "dev")]
#[cfg(not(windows))]
#[test]
fn test() {
fn run() -> Result<()> {
let project = HProject::new(true)?;

project.xargo_toml(
if std::env::var("TRAVIS_RUST_VERSION").ok().map_or(false,
|var| var.starts_with("nightly-2018"))
{
// Testing an old version on CI, we need a different Xargo.toml.
project.xargo_toml(
"
[dependencies.std]
features = [\"panic_unwind\"]
[dependencies.test]
stage = 1
",
)?;
)?;
} else {
project.xargo_toml(
"
[dependencies.std]
features = [\"panic_unwind\"]
[dependencies.test]
",
)?;
}

xargo()?.arg("test").current_dir(project.td.path()).run()?;

Expand All @@ -788,7 +799,7 @@ stage = 1
run!()
}

/// Check multi stage sysroot builds with `xargo test`
/// Check multi stage sysroot builds with `xargo build`
#[cfg(feature = "dev")]
#[test]
fn alloc() {
Expand Down

0 comments on commit 2634e8f

Please sign in to comment.