]> git.lizzy.rs Git - rust.git/blob - travis.sh
update Rust
[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 export RUSTC_EXTRA_FLAGS="-D warnings"
12
13 # Prepare
14 echo "Build and install miri"
15 ./miri build --all-targets
16 ./miri install
17 echo
18
19 # Test
20 function run_tests {
21     ./miri test
22     # "miri test" has built the sysroot for us, now this should pass without
23     # any interactive questions.
24     test-cargo-miri/run-test.py
25 }
26
27 echo "Test host architecture"
28 run_tests
29 echo
30
31 echo "Test foreign architecture ($FOREIGN_TARGET)"
32 MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
33 echo