2018-12-12 12:15:57 -06:00
|
|
|
#!/bin/bash
|
2019-02-08 05:13:07 -06:00
|
|
|
set -euo pipefail
|
2018-12-12 12:15:57 -06:00
|
|
|
|
|
|
|
# Determine configuration
|
|
|
|
if [ "$TRAVIS_OS_NAME" == osx ]; then
|
|
|
|
export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
|
|
|
|
FOREIGN_TARGET=i686-apple-darwin
|
|
|
|
else
|
|
|
|
export MIRI_SYSROOT_BASE=~/.cache/miri/
|
|
|
|
FOREIGN_TARGET=i686-unknown-linux-gnu
|
|
|
|
fi
|
|
|
|
|
2018-12-12 12:52:49 -06:00
|
|
|
echo "Build and install miri"
|
2018-12-15 07:13:46 -06:00
|
|
|
cargo build --release --all-features --all-targets
|
2018-12-12 12:15:57 -06:00
|
|
|
cargo install --all-features --force --path .
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|
2018-12-12 12:15:57 -06:00
|
|
|
|
2018-12-12 12:52:49 -06:00
|
|
|
echo "Get ourselves a MIR-full libstd for the host and a foreign architecture"
|
2018-12-15 07:13:46 -06:00
|
|
|
cargo miri setup
|
2018-12-12 12:15:57 -06:00
|
|
|
cargo miri setup --target "$FOREIGN_TARGET"
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|
2018-12-12 12:15:57 -06:00
|
|
|
|
2018-12-12 12:52:49 -06:00
|
|
|
echo "Test miri with full MIR, on the host and other architectures"
|
2018-12-15 07:13:46 -06:00
|
|
|
MIRI_SYSROOT="$MIRI_SYSROOT_BASE"/HOST cargo test --release --all-features
|
2019-04-07 03:57:25 -05:00
|
|
|
MIRI_SYSROOT="$MIRI_SYSROOT_BASE" MIRI_COMPILETEST_TARGET="$FOREIGN_TARGET" cargo test --release --all-features
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|
2018-12-12 12:15:57 -06:00
|
|
|
|
2018-12-12 12:52:49 -06:00
|
|
|
echo "Test cargo integration"
|
2018-12-15 07:13:46 -06:00
|
|
|
(cd test-cargo-miri && MIRI_SYSROOT="$MIRI_SYSROOT_BASE"/HOST ./run-test.py)
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|