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
|
|
|
|
FOREIGN_TARGET=i686-apple-darwin
|
|
|
|
else
|
|
|
|
FOREIGN_TARGET=i686-unknown-linux-gnu
|
|
|
|
fi
|
|
|
|
|
2019-04-21 15:35:47 -05:00
|
|
|
# Prepare
|
2018-12-12 12:52:49 -06:00
|
|
|
echo "Build and install miri"
|
2019-05-27 07:40:27 -05:00
|
|
|
./miri build --all-features --all-targets
|
|
|
|
./miri install
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|
2018-12-12 12:15:57 -06:00
|
|
|
|
2019-04-21 15:35:47 -05:00
|
|
|
# Test
|
|
|
|
function run_tests {
|
2019-05-27 07:40:27 -05:00
|
|
|
./miri test
|
|
|
|
test-cargo-miri/run-test.py
|
2019-04-21 15:35:47 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
echo "Test host architecture"
|
|
|
|
run_tests
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|
2018-12-12 12:15:57 -06:00
|
|
|
|
2019-04-21 15:35:47 -05:00
|
|
|
echo "Test foreign architecture ($FOREIGN_TARGET)"
|
2019-05-27 07:40:27 -05:00
|
|
|
MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
|
2018-12-12 12:52:49 -06:00
|
|
|
echo
|