Add tools/arm64_test.sh

This commit is contained in:
Eric Biggers 2016-09-03 16:02:13 -07:00
parent 683832e824
commit c2c8005591

15
tools/arm64_test.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
NDKDIR=/opt/android-ndk
make -j benchmark \
CC="$NDKDIR/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-gcc" \
CFLAGS="--sysroot=$NDKDIR/platforms/android-21/arch-arm64 -fPIC -pie"
adb push benchmark /data/local/tmp
if [ -z "$(adb shell '[ -e /data/local/tmp/testdata ] && echo 1')" ]; then
adb push $HOME/data/testdata /data/local/tmp
fi
adb shell /data/local/tmp/benchmark "$@" /data/local/tmp/testdata