Fix broken test.
authorEric Huss <eric@huss.org>
Thu, 3 May 2018 00:15:11 +0000 (17:15 -0700)
committerEric Huss <eric@huss.org>
Thu, 10 May 2018 15:46:02 +0000 (08:46 -0700)
tests/testsuite/check.rs

index b4c523bfd21a3978ecfa8639b5b18600e19234cb..cf20db7d0b20246af81c110c1184ea4d4cc44329 100644 (file)
@@ -1,4 +1,5 @@
 use cargotest::install::exe;
+use cargotest::is_nightly;
 use cargotest::support::paths::CargoPathExt;
 use cargotest::support::registry::Package;
 use cargotest::support::{execs, project};
@@ -830,7 +831,12 @@ fn check_artifacts() {
         p.cargo("check").arg("--bin").arg("foo"),
         execs().with_status(0),
     );
-    assert_that(&p.root().join("target/debug/libfoo.rmeta"), existing_file());
+    if is_nightly() {
+        // The nightly check can be removed once 1.27 is stable.
+        // Bins now generate `rmeta` files.
+        // See: https://github.com/rust-lang/rust/pull/49289
+        assert_that(&p.root().join("target/debug/libfoo.rmeta"), existing_file());
+    }
     assert_that(
         &p.root().join("target/debug/libfoo.rlib"),
         is_not(existing_file()),