Skip to content

Commit 034bb25

Browse files
committed
fix 'cargo miri test' for full MIR, and run it on CI
1 parent ff0f856 commit 034bb25

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

.travis.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,37 +24,38 @@ before_script:
2424
script:
2525
- set -e
2626
- |
27-
# get ourselves a MIR-ful libstd
28-
xargo/build.sh
29-
- |
30-
# Test plain miri
27+
# Test and install plain miri
3128
cargo build --release --all-features &&
3229
RUST_BACKTRACE=1 cargo test --release --all-features --all &&
3330
cargo install --all-features --force
31+
- |
32+
# test that the rustc_tests binary compiles
33+
cd rustc_tests &&
34+
cargo build --release &&
35+
cd ..
36+
- |
37+
# get ourselves a MIR-full libstd
38+
xargo/build.sh &&
39+
export MIRI_SYSROOT=~/.xargo/HOST
3440
- |
3541
# Test `cargo miri`
3642
cd cargo-miri-test &&
3743
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
38-
MIRI_SYSROOT=~/.xargo/HOST cargo miri -q -- -Zmiri-start-fn
44+
cargo miri -q -- -Zmiri-start-fn
3945
else
40-
MIRI_SYSROOT=~/.xargo/HOST cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
46+
cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
4147
cat stdout.real stderr.real &&
4248
# Test `cargo miri` output. Not on mac because output redirecting doesn't
4349
# work. There is no error. It just stops CI.
4450
diff -u stdout.ref stdout.real &&
4551
diff -u stderr.ref stderr.real
4652
fi &&
4753
# Test `cargo miri test`
48-
#cargo miri test &&
54+
cargo miri test &&
4955
cd ..
5056
- |
5157
# and run all tests with full mir
52-
MIRI_SYSROOT=~/.xargo/HOST cargo test --release
53-
- |
54-
# test that the rustc_tests binary compiles
55-
cd rustc_tests &&
56-
cargo build --release &&
57-
cd ..
58+
cargo test --release
5859
notifications:
5960
email:
6061
on_success: never

xargo/Xargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
[dependencies]
2-
std = {features = ["panic_unwind", "jemalloc", "backtrace"]}
1+
[dependencies.std]
2+
features = ["panic_unwind", "jemalloc", "backtrace"]
3+
4+
[dependencies.test]
5+
stage = 1

0 commit comments

Comments
 (0)