2018-12-12 19:15:57 +01:00
|
|
|
#!/bin/bash
|
2019-02-08 12:13:07 +01:00
|
|
|
set -euo pipefail
|
2018-12-12 19:15:57 +01:00
|
|
|
|
|
|
|
# Determine configuration
|
|
|
|
if [ "$TRAVIS_OS_NAME" == osx ]; then
|
|
|
|
FOREIGN_TARGET=i686-apple-darwin
|
|
|
|
else
|
|
|
|
FOREIGN_TARGET=i686-unknown-linux-gnu
|
|
|
|
fi
|
2019-05-28 19:02:54 +02:00
|
|
|
export CARGO_EXTRA_FLAGS="--all-features"
|
2018-12-12 19:15:57 +01:00
|
|
|
|
2019-04-21 22:35:47 +02:00
|
|
|
# Prepare
|
2018-12-12 19:52:49 +01:00
|
|
|
echo "Build and install miri"
|
2019-05-28 19:02:54 +02:00
|
|
|
./miri build --all-targets
|
2019-05-27 14:40:27 +02:00
|
|
|
./miri install
|
2018-12-12 19:52:49 +01:00
|
|
|
echo
|
2018-12-12 19:15:57 +01:00
|
|
|
|
2019-04-21 22:35:47 +02:00
|
|
|
# Test
|
|
|
|
function run_tests {
|
2019-05-27 14:40:27 +02:00
|
|
|
./miri test
|
2019-05-27 15:19:53 +02:00
|
|
|
# "miri test" has built the sysroot for us, now this should pass without
|
|
|
|
# any interactive questions.
|
2019-05-27 14:40:27 +02:00
|
|
|
test-cargo-miri/run-test.py
|
2019-04-21 22:35:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Test host architecture"
|
|
|
|
run_tests
|
2018-12-12 19:52:49 +01:00
|
|
|
echo
|
2018-12-12 19:15:57 +01:00
|
|
|
|
2019-04-21 22:35:47 +02:00
|
|
|
echo "Test foreign architecture ($FOREIGN_TARGET)"
|
2019-05-27 14:40:27 +02:00
|
|
|
MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
|
2018-12-12 19:52:49 +01:00
|
|
|
echo
|