libc-rs/ci/run.sh

49 lines
1.1 KiB
Bash
Raw Normal View History

2015-09-12 20:22:42 +02:00
#!/bin/sh
2015-09-18 02:45:10 +02:00
# Builds and runs tests for a particular target passed as an argument to this
# script.
2015-09-12 20:22:42 +02:00
set -ex
TARGET=$1
2015-09-20 08:20:53 +02:00
case "$TARGET" in
*-apple-ios)
cargo rustc --manifest-path libc-test/Cargo.toml --target $TARGET -- \
-C link-args=-mios-simulator-version-min=7.0
;;
*)
cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
;;
esac
2015-09-12 20:22:42 +02:00
2015-09-19 02:30:58 +02:00
case "$TARGET" in
arm-linux-androideabi)
2015-09-12 20:22:42 +02:00
emulator @test -no-window &
adb wait-for-device
2015-09-16 08:28:52 +02:00
adb push /root/target/$TARGET/debug/libc-test /data/libc-test
adb shell /data/libc-test
2015-09-19 02:30:58 +02:00
;;
arm-unknown-linux-gnueabihf)
2015-09-16 08:28:52 +02:00
qemu-arm -L /usr/arm-linux-gnueabihf libc-test/target/$TARGET/debug/libc-test
2015-09-19 02:30:58 +02:00
;;
mips-unknown-linux-gnu)
2015-09-19 01:32:03 +02:00
qemu-mips -L /usr/mips-linux-gnu libc-test/target/$TARGET/debug/libc-test
2015-09-19 02:30:58 +02:00
;;
aarch64-unknown-linux-gnu)
qemu-aarch64 -L /usr/aarch64-linux-gnu/ \
libc-test/target/$TARGET/debug/libc-test
;;
2015-09-20 08:20:53 +02:00
*-apple-ios)
libc-test/target/$TARGET/debug/libc-test
;;
2015-09-19 02:30:58 +02:00
*)
2015-09-16 08:28:52 +02:00
cargo run --manifest-path libc-test/Cargo.toml --target $TARGET
2015-09-19 02:30:58 +02:00
;;
esac