From 034bb25f548fff29d9caab6f0ebe232b9ba11278 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 14 Aug 2018 09:34:41 +0200 Subject: [PATCH] fix 'cargo miri test' for full MIR, and run it on CI --- .travis.yml | 27 ++++++++++++++------------- xargo/Xargo.toml | 7 +++++-- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index bded347b825a..1be324cba35e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,20 +24,26 @@ before_script: script: - set -e - | - # get ourselves a MIR-ful libstd - xargo/build.sh -- | - # Test plain miri + # Test and install plain miri cargo build --release --all-features && RUST_BACKTRACE=1 cargo test --release --all-features --all && cargo install --all-features --force +- | + # test that the rustc_tests binary compiles + cd rustc_tests && + cargo build --release && + cd .. +- | + # get ourselves a MIR-full libstd + xargo/build.sh && + export MIRI_SYSROOT=~/.xargo/HOST - | # Test `cargo miri` cd cargo-miri-test && if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - MIRI_SYSROOT=~/.xargo/HOST cargo miri -q -- -Zmiri-start-fn + cargo miri -q -- -Zmiri-start-fn else - MIRI_SYSROOT=~/.xargo/HOST cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real && + cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real && cat stdout.real stderr.real && # Test `cargo miri` output. Not on mac because output redirecting doesn't # work. There is no error. It just stops CI. @@ -45,16 +51,11 @@ script: diff -u stderr.ref stderr.real fi && # Test `cargo miri test` - #cargo miri test && + cargo miri test && cd .. - | # and run all tests with full mir - MIRI_SYSROOT=~/.xargo/HOST cargo test --release -- | - # test that the rustc_tests binary compiles - cd rustc_tests && - cargo build --release && - cd .. + cargo test --release notifications: email: on_success: never diff --git a/xargo/Xargo.toml b/xargo/Xargo.toml index 4b650b97de56..c022837a5e61 100644 --- a/xargo/Xargo.toml +++ b/xargo/Xargo.toml @@ -1,2 +1,5 @@ -[dependencies] -std = {features = ["panic_unwind", "jemalloc", "backtrace"]} +[dependencies.std] +features = ["panic_unwind", "jemalloc", "backtrace"] + +[dependencies.test] +stage = 1