Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 1 | #!/bin/bash -e |
| 2 | |
| 3 | . $(dirname $0)/../build/run-on-host.sh |
| 4 | |
| 5 | if [ "$1" = glibc ]; then |
| 6 | m -j bionic-benchmarks-glibc |
| 7 | ( |
| 8 | cd ${ANDROID_BUILD_TOP} |
| 9 | export ANDROID_DATA=${TARGET_OUT_DATA} |
| 10 | export ANDROID_ROOT=${TARGET_OUT} |
Ryan Prichard | 3cfb89d | 2019-09-20 15:42:48 -0700 | [diff] [blame^] | 11 | ${HOST_OUT}/benchmarktest64/bionic-benchmarks-glibc/bionic-benchmarks-glibc "$@" |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 12 | ) |
| 13 | exit 0 |
| 14 | elif [ "$1" != 32 -a "$1" != 64 ]; then |
Anders Lewis | 814359a | 2017-08-11 16:07:18 -0700 | [diff] [blame] | 15 | echo "Usage: $0 [ 32 | 64 | glibc ] [benchmark flags]" |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 16 | exit 1 |
| 17 | fi |
| 18 | |
| 19 | if [ ${HOST_OS}-${HOST_ARCH} = linux-x86 -o ${HOST_OS}-${HOST_ARCH} = linux-x86_64 ]; then |
| 20 | |
| 21 | prepare $1 bionic-benchmarks |
| 22 | |
| 23 | if [ ${TARGET_ARCH} = x86 -o ${TARGET_ARCH} = x86_64 ]; then |
| 24 | ( |
| 25 | cd ${ANDROID_BUILD_TOP} |
| 26 | export ANDROID_DATA=${TARGET_OUT_DATA} |
| 27 | export ANDROID_ROOT=${TARGET_OUT} |
Ryan Prichard | 3cfb89d | 2019-09-20 15:42:48 -0700 | [diff] [blame^] | 28 | ${BENCHMARKS}/bionic-benchmarks/bionic-benchmarks "$@" |
Colin Cross | 2722ebb | 2016-07-11 16:20:06 -0700 | [diff] [blame] | 29 | ) |
| 30 | else |
| 31 | echo "$0 not supported on TARGET_ARCH=$TARGET_ARCH" |
| 32 | fi |
| 33 | fi |