提交 17b368fd 编写于 作者: Y Young-il Choi

mk: configurable android test directory

上级 6f6dd862
...@@ -164,7 +164,7 @@ endef ...@@ -164,7 +164,7 @@ endef
$(foreach target,$(CFG_TARGET_TRIPLES), \ $(foreach target,$(CFG_TARGET_TRIPLES), \
$(if $(findstring $(target),"arm-linux-androideabi"), \ $(if $(findstring $(target),"arm-linux-androideabi"), \
$(if $(findstring adb,$(shell which adb)), \ $(if $(findstring adb,$(shell which adb)), \
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[A-Za-z0-9]+[[:blank:]]+device')), \ $(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[A-Za-z0-9-]+[[:blank:]]+device')), \
$(info install: install-runtime-target for arm-linux-androideabi enabled \ $(info install: install-runtime-target for arm-linux-androideabi enabled \
$(info install: android device attached) \ $(info install: android device attached) \
$(eval $(call DEF_ADB_STATUS, true))), \ $(eval $(call DEF_ADB_STATUS, true))), \
...@@ -181,6 +181,8 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \ ...@@ -181,6 +181,8 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \
ifeq ($(CFG_ADB_DEVICE),true) ifeq ($(CFG_ADB_DEVICE),true)
CFG_RUNTIME_PUSH_DIR=/system/lib
ifdef VERBOSE ifdef VERBOSE
ADB = adb $(1) ADB = adb $(1)
ADB_PUSH = adb push $(1) $(2) ADB_PUSH = adb push $(1) $(2)
...@@ -193,17 +195,18 @@ endif ...@@ -193,17 +195,18 @@ endif
define INSTALL_RUNTIME_TARGET_N define INSTALL_RUNTIME_TARGET_N
install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2)) install-runtime-target-$(1)-host-$(2): $$(TSREQ$$(ISTAGE)_T_$(1)_H_$(2)) $$(SREQ$$(ISTAGE)_T_$(1)_H_$(2))
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CFG_RUNTIME_$(1)),/system/lib) $(Q)$(call ADB_SHELL,mkdir,$(CFG_RUNTIME_PUSH_DIR))
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CORELIB_GLOB_$(1)),/system/lib) $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CFG_RUNTIME_$(1)),$(CFG_RUNTIME_PUSH_DIR))
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),/system/lib) $(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(CORELIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
$(Q)$(call ADB_PUSH,$$(TL$(1)$(2))/$$(STDLIB_GLOB_$(1)),$(CFG_RUNTIME_PUSH_DIR))
endef endef
define INSTALL_RUNTIME_TARGET_CLEANUP_N define INSTALL_RUNTIME_TARGET_CLEANUP_N
install-runtime-target-$(1)-cleanup: install-runtime-target-$(1)-cleanup:
$(Q)$(call ADB,remount) $(Q)$(call ADB,remount)
$(Q)$(call ADB_SHELL,rm,/system/lib/$(CFG_RUNTIME_$(1))) $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CFG_RUNTIME_$(1)))
$(Q)$(call ADB_SHELL,rm,/system/lib/$(CORELIB_GLOB_$(1))) $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(CORELIB_GLOB_$(1)))
$(Q)$(call ADB_SHELL,rm,/system/lib/$(STDLIB_GLOB_$(1))) $(Q)$(call ADB_SHELL,rm,$(CFG_RUNTIME_PUSH_DIR)/$(STDLIB_GLOB_$(1)))
endef endef
$(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD_TRIPLE))) $(eval $(call INSTALL_RUNTIME_TARGET_N,arm-linux-androideabi,$(CFG_BUILD_TRIPLE)))
......
...@@ -104,7 +104,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \ ...@@ -104,7 +104,7 @@ $(foreach target,$(CFG_TARGET_TRIPLES), \
$(eval $(call DEF_RUNNABLE_STATUS,$(target),true))), \ $(eval $(call DEF_RUNNABLE_STATUS,$(target),true))), \
$(if $(findstring $(target),"arm-linux-androideabi"), \ $(if $(findstring $(target),"arm-linux-androideabi"), \
$(if $(findstring adb,$(shell which adb)), \ $(if $(findstring adb,$(shell which adb)), \
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[A-Za-z0-9]+[[:blank:]]+device')), \ $(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[A-Za-z0-9-]+[[:blank:]]+device')), \
$(info check: $(target) test set is runnable \ $(info check: $(target) test set is runnable \
$(info check: adb device attached) \ $(info check: adb device attached) \
$(eval $(call DEF_RUNNABLE_STATUS,$(target),true))), \ $(eval $(call DEF_RUNNABLE_STATUS,$(target),true))), \
...@@ -129,9 +129,8 @@ CFG_ADB_PATH := $(shell which adb) ...@@ -129,9 +129,8 @@ CFG_ADB_PATH := $(shell which adb)
CFG_ADB_TEST_DIR=/system/tmp CFG_ADB_TEST_DIR=/system/tmp
$(info check: device $(CFG_ADB_TEST_DIR) \ $(info check: device $(CFG_ADB_TEST_DIR) \
$(shell $(CFG_ADB_PATH) remount 1>/dev/null) \
$(shell $(CFG_ADB_PATH) shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \ $(shell $(CFG_ADB_PATH) shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \
$(shell $(CFG_ADB_PATH) shell rm $(CFG_ADB_TEST_DIR)/*-arm-linux-androideabi 1>/dev/null) \
$(shell $(CFG_ADB_PATH) shell rm $(CFG_ADB_TEST_DIR)/*.so 1>/dev/null) \
) )
endif endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册