]> git.lizzy.rs Git - rust.git/blob - travis.sh
Auto merge of #1152 - divergentdave:shim-directory, r=RalfJung
[rust.git] / travis.sh
1 #!/bin/bash
2 set -euo pipefail
3
4 # Determine configuration
5 if [ "$TRAVIS_OS_NAME" == linux ]; then
6   FOREIGN_TARGET=i686-unknown-linux-gnu
7 fi
8 export CARGO_EXTRA_FLAGS="--all-features"
9 export RUSTC_EXTRA_FLAGS="-D warnings"
10
11 # Prepare
12 echo "Build and install miri"
13 ./miri build --all-targets --locked
14 ./miri install # implicitly locked
15 echo
16
17 # Test
18 function run_tests {
19     ./miri test --locked
20     # "miri test" has built the sysroot for us, now this should pass without
21     # any interactive questions.
22     test-cargo-miri/run-test.py
23 }
24
25 echo "Test host architecture"
26 run_tests
27 echo
28
29 if [ -n "${FOREIGN_TARGET+exists}" ]; then
30   echo "Test foreign architecture ($FOREIGN_TARGET)"
31   MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
32   echo
33 fi