blob: 9604f1be113786d7c755222e65f7ca0fe9f4b387 [file] [log] [blame]
Alex Crichton79199af2015-09-12 11:22:42 -07001#!/bin/sh
2
3set -ex
4
5TARGET=$1
Alex Crichtond11e9142015-09-15 23:28:52 -07006cargo build --manifest-path libc-test/Cargo.toml --target $TARGET
Alex Crichton79199af2015-09-12 11:22:42 -07007
8if [ "$TARGET" = "arm-linux-androideabi" ]; then
9 emulator @test -no-window &
10 adb wait-for-device
Alex Crichtond11e9142015-09-15 23:28:52 -070011 adb push /root/target/$TARGET/debug/libc-test /data/libc-test
12 adb shell /data/libc-test
Alex Crichton23ab70b2015-09-13 23:38:27 -070013elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then
Alex Crichtond11e9142015-09-15 23:28:52 -070014 qemu-arm -L /usr/arm-linux-gnueabihf libc-test/target/$TARGET/debug/libc-test
Alex Crichton944a7332015-09-14 11:27:10 -070015elif [ "$TARGET" = "mips-unknown-linux-gnu" ]; then
Alex Crichton412d4f92015-09-14 17:33:40 -070016 # FIXME: this segfaults on travis, passes locally?
17 #qemu-mips -L /usr/mips-linux-gnu libc-test/target/$TARGET/debug/all-*
Alex Crichton17da63d2015-09-14 17:52:07 -070018 echo skip
Alex Crichton79199af2015-09-12 11:22:42 -070019else
Alex Crichtond11e9142015-09-15 23:28:52 -070020 cargo run --manifest-path libc-test/Cargo.toml --target $TARGET
Alex Crichton79199af2015-09-12 11:22:42 -070021fi