Skip to content

Commit 2634e8f

Browse files
committed
adjust tests for rsutc changes
1 parent 1462e72 commit 2634e8f

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

tests/smoke.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -761,24 +761,35 @@ fn host_twice() {
761761
}
762762

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

773-
project.xargo_toml(
770+
if std::env::var("TRAVIS_RUST_VERSION").ok().map_or(false,
771+
|var| var.starts_with("nightly-2018"))
772+
{
773+
// Testing an old version on CI, we need a different Xargo.toml.
774+
project.xargo_toml(
774775
"
775776
[dependencies.std]
776777
features = [\"panic_unwind\"]
777778
778779
[dependencies.test]
779780
stage = 1
780781
",
781-
)?;
782+
)?;
783+
} else {
784+
project.xargo_toml(
785+
"
786+
[dependencies.std]
787+
features = [\"panic_unwind\"]
788+
789+
[dependencies.test]
790+
",
791+
)?;
792+
}
782793

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

@@ -788,7 +799,7 @@ stage = 1
788799
run!()
789800
}
790801

791-
/// Check multi stage sysroot builds with `xargo test`
802+
/// Check multi stage sysroot builds with `xargo build`
792803
#[cfg(feature = "dev")]
793804
#[test]
794805
fn alloc() {

0 commit comments

Comments
 (0)