From f1338fbf4104f000e41b4f84f705db72096da324 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 25 Oct 2016 15:05:40 -0700 Subject: tests: Generate testdata for 2nd arch. We currently only copy the testdata to $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery, which fails the tests generated for 2nd arch (TARGET_2ND_ARCH). For example, on angler /data/nativetest/recovery_component_test/recovery_component_test fails due to missing testdata. Bug: 32123241 Test: Both of /data/nativetest/recovery... and /data/nativetest64/recovery... work on angler. Change-Id: Ib76264b4408d01c08b2619c8ac84b2476ea5a8bc --- tests/Android.mk | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/Android.mk b/tests/Android.mk index abe6b6d68..3d05386b0 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -84,13 +84,24 @@ LOCAL_STATIC_LIBRARIES := \ libtune2fs \ $(tune2fs_static_libraries) -testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery testdata_files := $(call find-subdir-files, testdata/*) +testdata_out_path := $(TARGET_OUT_DATA_NATIVE_TESTS)/recovery GEN := $(addprefix $(testdata_out_path)/, $(testdata_files)) $(GEN): PRIVATE_PATH := $(LOCAL_PATH) $(GEN): PRIVATE_CUSTOM_TOOL = cp $< $@ $(GEN): $(testdata_out_path)/% : $(LOCAL_PATH)/% $(transform-generated-source) LOCAL_GENERATED_SOURCES += $(GEN) + +ifdef TARGET_2ND_ARCH +testdata_out_path_2nd_arch := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/recovery +GEN_2ND_ARCH := $(addprefix $(testdata_out_path_2nd_arch)/, $(testdata_files)) +$(GEN_2ND_ARCH): PRIVATE_PATH := $(LOCAL_PATH) +$(GEN_2ND_ARCH): PRIVATE_CUSTOM_TOOL = cp $< $@ +$(GEN_2ND_ARCH): $(testdata_out_path_2nd_arch)/% : $(LOCAL_PATH)/% + $(transform-generated-source) +LOCAL_GENERATED_SOURCES += $(GEN_2ND_ARCH) +endif # TARGET_2ND_ARCH + include $(BUILD_NATIVE_TEST) -- cgit v1.2.3