blob: dcaa5566b921c166b3a4bf12a5940b02707b894f [file] [log] [blame]
Alex Crichton83a30492015-09-12 16:15:48 -07001set -ex
2
Alex Crichtone47a4502015-09-12 16:42:49 -07003if [ "$TRAVIS_OS_NAME" = "linux" ]; then
Alex Crichton83a30492015-09-12 16:15:48 -07004 OS=unknown-linux-gnu
5else
6 OS=apple-darwin
7fi
8
9export HOST=$ARCH-$OS
10
Alex Crichton3f07aeb2015-09-12 16:35:52 -070011# clang has better error messages and implements alignof more broadly
12export CC=clang
13
Alex Crichtonacda0132015-09-13 11:22:26 -070014if [ "$TARGET" = "arm-linux-androideabi" ]; then
15 # Pull a pre-built docker image for testing android, then run tests entirely
16 # within that image.
17 docker pull alexcrichton/rust-libc-test
18 docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET
Alex Crichton2f846f32015-09-13 21:21:46 -070019elif [ "$TARGET" = "x86_64-unknown-linux-musl" ]; then
Alex Crichtonacda0132015-09-13 11:22:26 -070020 curl -sO https://people.mozilla.org/~acrichton/libc-test/2015-09-08/x86_64-unknown-linux-musl.tar.gz | \
21 tar xzf -C $HOME/rust/lib/rustlib
22 sh ci/run.sh $TARGET
23else
Alex Crichton83a30492015-09-12 16:15:48 -070024 # Download and install the relevant target locally, then run tests
25 curl -sO https://static.rust-lang.org/dist/rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz
26 tar xf rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz
27 rm -rf $HOME/rust/lib/rustlib/$HOST
28 mv rust-$TRAVIS_RUST_VERSION-$HOST/rustc/lib/rustlib/$HOST \
29 $HOME/rust/lib/rustlib
30 sh ci/run.sh $HOST
Alex Crichton83a30492015-09-12 16:15:48 -070031fi