]> git.lizzy.rs Git - rust.git/blob - travis.sh
dont add the -Zmiri-seed flag twice
[rust.git] / travis.sh
1 #!/bin/bash
2 set -euo pipefail
3
4 # Determine configuration
5 if [ "$TRAVIS_OS_NAME" == osx ]; then
6   FOREIGN_TARGET=i686-apple-darwin
7 else
8   FOREIGN_TARGET=i686-unknown-linux-gnu
9 fi
10 export CARGO_EXTRA_FLAGS="--all-features"
11
12 # Prepare
13 echo "Build and install miri"
14 ./miri build --all-targets
15 ./miri install
16 echo
17
18 # Test
19 function run_tests {
20     ./miri test
21     # "miri test" has built the sysroot for us, now this should pass without
22     # any interactive questions.
23     test-cargo-miri/run-test.py
24 }
25
26 echo "Test host architecture"
27 run_tests
28 echo
29
30 echo "Test foreign architecture ($FOREIGN_TARGET)"
31 MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
32 echo