From 088c5afa02c1d5462302d1a0200bbfd4d4b8f91a Mon Sep 17 00:00:00 2001 From: Rahul Frias Date: Thu, 21 Feb 2019 01:28:48 -0800 Subject: [PATCH] Move WV unit/integration tests to /data/nativetest [ Merge of http://go/wvgerrit/73044 ] The tests currently get copied to /data/bin. Changes in location of system libraries causes test failures when tests are unable to find dependent dynamic libraries. Bug: 123879070 Test: WV unit/integration tests Change-Id: I86edbe33b4753238fcf8b84243ac6e6c058ea145 --- libwvdrmengine/build_and_run_all_unit_tests.sh | 14 +++++++------- libwvdrmengine/cdm/test/integration-test.mk | 4 ++-- libwvdrmengine/cdm/test/unit-test.mk | 4 ++-- libwvdrmengine/mediacrypto/test/Android.mk | 8 ++++---- libwvdrmengine/mediadrm/test/Android.mk | 12 ++++++------ libwvdrmengine/oemcrypto/test/Android.mk | 4 ++-- libwvdrmengine/run_all_unit_tests.sh | 6 +++--- libwvdrmengine/test/unit/Android.mk | 8 ++++---- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/libwvdrmengine/build_and_run_all_unit_tests.sh b/libwvdrmengine/build_and_run_all_unit_tests.sh index 335eab6e..3159738b 100755 --- a/libwvdrmengine/build_and_run_all_unit_tests.sh +++ b/libwvdrmengine/build_and_run_all_unit_tests.sh @@ -64,19 +64,19 @@ fi # Push the files to the device -# Given a local path to a file, this will try to push it to /data/bin. +# Given a local path to a file, this will try to push it to /data/nativetest. # If that fails, an error message will be printed. try_adb_push() { - # android-tests.zip requires /data/bin, we should use the same - if [ -f $OUT/data/bin/$1 ]; then - test_file=$OUT/data/bin/$1 + # android-tests.zip requires /data/nativetest, we should use the same + if [ -f $OUT/data/nativetest/$1 ]; then + test_file=$OUT/data/nativetest/$1 else echo "I cannot find $1" - echo "I think it should be in $OUT/data/bin" + echo "I think it should be in $OUT/data/nativetest" exit 1 fi - adb $SERIAL_NUM shell mkdir -p /data/bin - adb $SERIAL_NUM push $test_file /data/bin/$1 + adb $SERIAL_NUM shell mkdir -p /data/nativetest + adb $SERIAL_NUM push $test_file /data/nativetest/$1 } # Push the tests to the device diff --git a/libwvdrmengine/cdm/test/integration-test.mk b/libwvdrmengine/cdm/test/integration-test.mk index 30f315b1..5069c66a 100644 --- a/libwvdrmengine/cdm/test/integration-test.mk +++ b/libwvdrmengine/cdm/test/integration-test.mk @@ -57,8 +57,8 @@ LOCAL_CFLAGS += -DUNIT_TEST LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips diff --git a/libwvdrmengine/cdm/test/unit-test.mk b/libwvdrmengine/cdm/test/unit-test.mk index a897cad3..0bebaf9c 100644 --- a/libwvdrmengine/cdm/test/unit-test.mk +++ b/libwvdrmengine/cdm/test/unit-test.mk @@ -57,8 +57,8 @@ LOCAL_CFLAGS += -DUNIT_TEST LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips diff --git a/libwvdrmengine/mediacrypto/test/Android.mk b/libwvdrmengine/mediacrypto/test/Android.mk index 0dba1f16..31966cb0 100644 --- a/libwvdrmengine/mediacrypto/test/Android.mk +++ b/libwvdrmengine/mediacrypto/test/Android.mk @@ -49,8 +49,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips @@ -116,8 +116,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips diff --git a/libwvdrmengine/mediadrm/test/Android.mk b/libwvdrmengine/mediadrm/test/Android.mk index e03fea2c..35fdb24a 100644 --- a/libwvdrmengine/mediadrm/test/Android.mk +++ b/libwvdrmengine/mediadrm/test/Android.mk @@ -48,8 +48,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips @@ -115,8 +115,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips @@ -176,8 +176,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips diff --git a/libwvdrmengine/oemcrypto/test/Android.mk b/libwvdrmengine/oemcrypto/test/Android.mk index 26350cd2..3b8ed93e 100644 --- a/libwvdrmengine/oemcrypto/test/Android.mk +++ b/libwvdrmengine/oemcrypto/test/Android.mk @@ -11,8 +11,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips diff --git a/libwvdrmengine/run_all_unit_tests.sh b/libwvdrmengine/run_all_unit_tests.sh index ad080e91..86dd8804 100755 --- a/libwvdrmengine/run_all_unit_tests.sh +++ b/libwvdrmengine/run_all_unit_tests.sh @@ -30,10 +30,10 @@ fi adb_shell_run() { local test_file=$1 shift - if adb $SERIAL_NUM shell ls /data/bin/$test_file &> /dev/null; then - test_file=/data/bin/$test_file + if adb $SERIAL_NUM shell ls /data/nativetest/$test_file &> /dev/null; then + test_file=/data/nativetest/$test_file else - echo "Please install the test on the device in /data/bin, " + echo "Please install the test on the device in /data/nativetest, " echo "or begin execution by running ./build_and_run_all_unit_tests.sh" exit 1 fi diff --git a/libwvdrmengine/test/unit/Android.mk b/libwvdrmengine/test/unit/Android.mk index 39c4718d..7b1617f8 100644 --- a/libwvdrmengine/test/unit/Android.mk +++ b/libwvdrmengine/test/unit/Android.mk @@ -35,8 +35,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips @@ -87,8 +87,8 @@ LOCAL_MODULE_TAGS := tests LOCAL_MODULE_OWNER := widevine LOCAL_PROPRIETARY_MODULE := true -# When built, explicitly put it in the DATA/bin directory. -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/bin +# When built, explicitly put it in the DATA/nativetest directory. +LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/nativetest ifneq ($(TARGET_ENABLE_MEDIADRM_64), true) LOCAL_MODULE_TARGET_ARCH := arm x86 mips