Rebecca Silberstein 3f26ff2f56 update wifi unit test script
Need to add "--no-hidden-api-checks" to unit test script.

Verified by running runtests

Bug: 78465388
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Change-Id: I916a2870bde2cbfe1966d18a0f7a13def2bd1ce7
2018-04-23 15:54:36 -07:00

26 lines
720 B
Bash
Executable File

#!/usr/bin/env bash
if [ -z $ANDROID_BUILD_TOP ]; then
echo "You need to source and lunch before you can use this script"
exit 1
fi
echo "Running tests"
set -e # fail early
echo "+ mmma -j32 $ANDROID_BUILD_TOP/frameworks/base/wifi/tests"
# NOTE Don't actually run the command above since this shell doesn't inherit functions from the
# caller.
make -j32 -C $ANDROID_BUILD_TOP -f build/core/main.mk MODULES-IN-frameworks-base-wifi-tests
set -x # print commands
adb root
adb wait-for-device
adb install -r -g "$OUT/data/app/FrameworksWifiApiTests/FrameworksWifiApiTests.apk"
adb shell am instrument --no-hidden-api-checks -w "$@" \
'android.net.wifi.test/android.support.test.runner.AndroidJUnitRunner'