blob: 1902cfa66af8f3f9b734da781311da2e43a60a1e [file] [log] [blame]
Alex Crichton83a30492015-09-12 16:15:48 -07001set -ex
2
3if [ "$TRAVIS_OS_NAME" = "linux"]; then
4 OS=unknown-linux-gnu
5else
6 OS=apple-darwin
7fi
8
9export HOST=$ARCH-$OS
10
11if [ "$TARGET" = "" ]; then
12 # Download and install the relevant target locally, then run tests
13 curl -sO https://static.rust-lang.org/dist/rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz
14 tar xf rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz
15 rm -rf $HOME/rust/lib/rustlib/$HOST
16 mv rust-$TRAVIS_RUST_VERSION-$HOST/rustc/lib/rustlib/$HOST \
17 $HOME/rust/lib/rustlib
18 sh ci/run.sh $HOST
19
20elif [ "$TARGET" = "arm-linux-androideabi" ]; then
21 # Pull a pre-built docker image for testing android, then run tests entirely
22 # within that image.
23 docker pull alexcrichton/rust-libc-test
24 docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET
25else
26 echo "Unknown target: $TARGET"
27 exit 1
28fi