diff --git a/.travis.yml b/.travis.yml index 1c01adeb952b0b5001726db51bba5fe5d83af95d..8cb864c42122e3ca3d7b4b4f5d5aa4a0d4a0449b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,9 @@ matrix: - os: linux env: TARGET=x86_64-unknown-linux-musl rust: nightly-2015-09-08 + - os: linux + env: TARGET=arm-unknown-linux-gnueabihf + rust: nightly-2015-09-08 addons: apt: packages: diff --git a/ci/cargo-config b/ci/cargo-config index f1d42a30d0299df83a205aead330985d8455dae0..40b79f0631a90a8d3939b2a40937bda4875c4657 100644 --- a/ci/cargo-config +++ b/ci/cargo-config @@ -1,2 +1,5 @@ [target.arm-linux-androideabi] linker = "arm-linux-androideabi-gcc" + +[target.arm-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc-4.7" diff --git a/ci/run-travis.sh b/ci/run-travis.sh index a7d382f5e285134fd7705413f3b99bad91113ce0..5fa078662074b8a209d9fc77f68cb134dbf3df53 100644 --- a/ci/run-travis.sh +++ b/ci/run-travis.sh @@ -11,14 +11,22 @@ export HOST=$ARCH-$OS # clang has better error messages and implements alignof more broadly export CC=clang +EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/2015-09-08 + if [ "$TARGET" = "arm-linux-androideabi" ]; then # Pull a pre-built docker image for testing android, then run tests entirely # within that image. docker pull alexcrichton/rust-libc-test docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET elif [ "$TARGET" = "x86_64-unknown-linux-musl" ]; then - curl -s https://people.mozilla.org/~acrichton/libc-test/2015-09-08/x86_64-unknown-linux-musl.tar.gz | \ - tar xzf - -C $HOME/rust/lib/rustlib + curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib + sh ci/run.sh $TARGET +elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then + curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib + sudo apt-get install gcc-4.7-arm-linux-gnueabihf + mkdir .cargo + cp ci/cargo-config .cargo/config + export CC=arm-linux-gnueabihf-gcc-4.7 sh ci/run.sh $TARGET else # Download and install the relevant target locally, then run tests diff --git a/ci/run.sh b/ci/run.sh index 3f1f3bfbe3a1ba4a8ecc668b5ee3bfa683c1ee98..9e3e97038e2993471200eadd28a220e9d2c1c670 100644 --- a/ci/run.sh +++ b/ci/run.sh @@ -10,6 +10,8 @@ if [ "$TARGET" = "arm-linux-androideabi" ]; then adb wait-for-device adb push /root/target/$TARGET/debug/all-* /data/test adb shell /data/test +elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then + qemu-arm -L /usr/arm-linux-gnueabi /root/target/$TARGET/debug/all-* else cargo test --manifest-path libc-test/Cargo.toml --target $TARGET fi