• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash -e
2
3. $(dirname $0)/../build/run-on-host.sh
4
5if [ "$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}
11        ${HOST_OUT}/nativetest64/bionic-benchmarks-glibc/bionic-benchmarks-glibc $@
12    )
13    exit 0
14elif [ "$1" != 32 -a "$1" != 64 ]; then
15    echo "Usage: $0 [ 32 | 64 | glibc ] [gtest flags]"
16    exit 1
17fi
18
19if [ ${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}
28            ${NATIVETEST}/bionic-benchmarks/bionic-benchmarks $@
29        )
30    else
31        echo "$0 not supported on TARGET_ARCH=$TARGET_ARCH"
32    fi
33fi
34