From 80f5392763f5bbd2645140696bc347c65fea1acc Mon Sep 17 00:00:00 2001 From: Gabriel Biren Date: Wed, 14 Jun 2023 22:48:06 +0000 Subject: [PATCH] Improve process to run the Vendor HAL gTest suite. This includes: - Adding a README to help users get started. - Improving the test script to avoid issue where device is not ready for the next ADB command after 'adb root'. Bug: 271914366 Test: Manual test 1. Reboot device. 2. ./runtests.sh 3. Tests are expected to execute. Change-Id: I9f452384a7067708f617d1e932f06b2f5c7ab119 --- wifi/aidl/default/tests/README.md | 14 ++++++++++++++ wifi/aidl/default/tests/runtests.sh | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 wifi/aidl/default/tests/README.md diff --git a/wifi/aidl/default/tests/README.md b/wifi/aidl/default/tests/README.md new file mode 100644 index 0000000000..fc0a98ad92 --- /dev/null +++ b/wifi/aidl/default/tests/README.md @@ -0,0 +1,14 @@ +# Vendor HAL gTest Suite + +## Overview +Rather than testing an active instance of the service like the VTS tests, +this test suite will test individual files from the Vendor HAL. +This is especially useful for testing conversion methods (see `aidl_struct_util_unit_tests.cpp`), +but can also be used to test things like `wifi_chip`. + +## Usage +Run the test script with a device connected: + +``` +./runtests.sh +``` diff --git a/wifi/aidl/default/tests/runtests.sh b/wifi/aidl/default/tests/runtests.sh index 1f53ab8e05..228c82b950 100755 --- a/wifi/aidl/default/tests/runtests.sh +++ b/wifi/aidl/default/tests/runtests.sh @@ -20,7 +20,8 @@ if [ -z $ANDROID_BUILD_TOP ]; then fi set -e -$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode android.hardware.wifi-service-tests adb root +adb wait-for-device +$ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode android.hardware.wifi-service-tests adb sync data adb shell /data/nativetest64/vendor/android.hardware.wifi-service-tests/android.hardware.wifi-service-tests