Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | if [ -z $ANDROID_BUILD_TOP ]; then |
| 4 | echo "You need to source and lunch before you can use this script" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | echo "Running tests" |
| 9 | |
| 10 | set -e # fail early |
| 11 | |
| 12 | echo "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/wifi/tests" |
| 13 | # NOTE Don't actually run the command above since this shell doesn't inherit functions from the |
| 14 | # caller. |
| 15 | make -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk MODULES-IN-frameworks-base-wifi-tests |
| 16 | |
| 17 | set -x # print commands |
| 18 | |
| 19 | adb root |
| 20 | adb wait-for-device |
| 21 | |
Otto Seiskari | f442263 | 2019-04-12 13:16:14 +0300 | [diff] [blame] | 22 | TARGET_ARCH=$($ANDROID_BUILD_TOP/build/soong/soong_ui.bash --dumpvar-mode TARGET_ARCH) |
| 23 | adb install -r -g "$OUT/testcases/FrameworksWifiApiTests/$TARGET_ARCH/FrameworksWifiApiTests.apk" |
Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 24 | |
Rebecca Silberstein | 3f26ff2 | 2018-04-23 15:54:36 -0700 | [diff] [blame] | 25 | adb shell am instrument --no-hidden-api-checks -w "$@" \ |
KOUSHIK PANUGANTI | c9f79d8 | 2018-12-18 18:43:13 -0800 | [diff] [blame] | 26 | 'android.net.wifi.test/androidx.test.runner.AndroidJUnitRunner' |