summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Etan Cohen <etancohen@google.com> 2020-01-27 10:06:15 -0800
committer Etan Cohen <etancohen@google.com> 2020-01-27 10:06:26 -0800
commit8d12d098a67515de4e37cd3dccbfe1993acf1bb4 (patch)
tree644eae08c0d9cd694814edd4f9272e508907f944
parentc99357ab0af9f1cfdd6e3547bcc75e2d020dbdf9 (diff)
[WIFI] Update instructions for running tests
Time to stop using local solutions. Change-Id: If2fddf4874fc4019680e72f57f54fab7a5824278
-rw-r--r--wifi/tests/README.md21
-rwxr-xr-xwifi/tests/runtests.sh25
2 files changed, 1 insertions, 45 deletions
diff --git a/wifi/tests/README.md b/wifi/tests/README.md
index b0594f2d29b1..f90940470432 100644
--- a/wifi/tests/README.md
+++ b/wifi/tests/README.md
@@ -8,12 +8,9 @@ libraries.
The easiest way to run tests is simply run
```
-frameworks/base/wifi/tests/runtests.sh
+atest android.net.wifi
```
-`runtests.sh` will build the test project and all of its dependencies and push the APK to the
-connected device. It will then run the tests on the device.
-
To pick up changes in framework/base, you will need to:
1. rebuild the framework library 'make -j32'
2. sync over the updated library to the device 'adb sync'
@@ -24,22 +21,6 @@ To enable syncing data to the device for first time after clean reflash:
2. adb reboot
3. adb remount
-See below for a few example of options to limit which tests are run.
-See the
-[AndroidJUnitRunner Documentation](https://developer.android.com/reference/android/support/test/runner/AndroidJUnitRunner.html)
-for more details on the supported options.
-
-```
-runtests.sh -e package android.net.wifi
-runtests.sh -e class android.net.wifi.WifiScannerTest
-```
-
-If you manually build and push the test APK to the device you can run tests using
-
-```
-adb shell am instrument -w 'android.net.wifi.test/androidx.test.runner.AndroidJUnitRunner'
-```
-
## Adding Tests
Tests can be added by adding classes to the src directory. JUnit4 style test cases can
be written by simply annotating test methods with `org.junit.Test`.
diff --git a/wifi/tests/runtests.sh b/wifi/tests/runtests.sh
deleted file mode 100755
index 4024371dd97d..000000000000
--- a/wifi/tests/runtests.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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.
-$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode MODULES-IN-frameworks-base-wifi-tests
-
-set -x # print commands
-
-adb wait-for-device
-
-TARGET_ARCH=$($ANDROID_BUILD_TOP/build/soong/soong_ui.bash --dumpvar-mode TARGET_ARCH)
-adb install -r -g "$OUT/testcases/FrameworksWifiApiTests/$TARGET_ARCH/FrameworksWifiApiTests.apk"
-
-adb shell am instrument --no-hidden-api-checks -w "$@" \
- 'android.net.wifi.test/androidx.test.runner.AndroidJUnitRunner'