Build both AIDL and HIDL targets.

Merged from http://go/wvgerrit/147689

The default is to build for AIDL Widevine service.
Use "-t hidl" in build_and_run_all_unit_tests.sh or
build_all_unit_tests.sh to build for HIDL service.

Test: ./build_all_unit_tests -t hidl
Test: ./build_and_run_all_unit_tests -t hidl
Test: ./build_all_unit_tests
Test: ./build_and_run_all_unit_tests

Bug: 217247987
Change-Id: Ie7c51033f4aba341c829ccc8f846a6cfeab76df3
This commit is contained in:
Edwin
2022-03-10 08:44:43 -08:00
parent f2384c1b22
commit 77f1fedde2
5 changed files with 61 additions and 10 deletions

View File

@@ -8,10 +8,13 @@ if [ -z "$ANDROID_BUILD_TOP" ]; then
fi
# Read arguments in case the user wants to do a multicore build or
# copy files to a specific android device by providing a serial number
# copy files to a specific android device by providing a serial number.
# The default build target is for AIDL service, use "-t hidl" to
# build for HIDL service.
BUILD_TARGET=""
NUM_CORES=1
SERIAL_NUM=""
while getopts "j:s:" opt; do
while getopts "j:s:t:" opt; do
case $opt in
j)
NUM_CORES=$OPTARG
@@ -19,6 +22,9 @@ while getopts "j:s:" opt; do
s)
SERIAL_NUM="-s $OPTARG"
;;
t)
BUILD_TARGET="BUILD_TARGET=$OPTARG"
;;
esac
done
@@ -74,7 +80,7 @@ WV_TEST_TARGETS="base64_test \
cd $ANDROID_BUILD_TOP
pwd
m -j $NUM_CORES $WV_TEST_TARGETS
m -j $NUM_CORES $WV_TEST_TARGETS $BUILD_TARGET
# Detect the device and check if Verity is going to stop the script from working