blob: 04e49cacc31885dc97d7c5579d10d723bc5e3665 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/bin/sh
# Builds and runs tests for a particular target passed as an argument to this
# script.
set -ex
TARGET=$1
cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
if [ "$TARGET" = "arm-linux-androideabi" ]; then
emulator @test -no-window &
adb wait-for-device
adb push /root/target/$TARGET/debug/libc-test /data/libc-test
adb shell /data/libc-test
elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then
qemu-arm -L /usr/arm-linux-gnueabihf libc-test/target/$TARGET/debug/libc-test
elif [ "$TARGET" = "mips-unknown-linux-gnu" ]; then
qemu-mips -L /usr/mips-linux-gnu libc-test/target/$TARGET/debug/libc-test
elif [ "$TARGET" = "aarch64-unknown-linux-gnu" ]; then
qemu-aarch64 -L /usr/aarch64-linux-gnu/ libc-test/target/$TARGET/debug/libc-test
else
cargo run --manifest-path libc-test/Cargo.toml --target $TARGET
fi
|