Add one more depth on android test directory for multiple targets

This commit is contained in:
Eunji Jeong 2015-02-02 17:42:23 +09:00
parent fbe78e46eb
commit abd7fd924b
5 changed files with 17 additions and 13 deletions

View File

@ -120,7 +120,7 @@ endef
$(foreach target,$(CFG_TARGET), \
$(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
$(eval $(call INSTALL_RUNTIME_TARGET_N,$(taget),$(CFG_BUILD))) \
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-$(target))) \
$(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,$(target))) \
))
install-runtime-target: \

View File

@ -111,7 +111,6 @@ $(foreach target,$(CFG_TARGET), \
# for arm-linux-androidabi
define DEF_ADB_DEVICE_STATUS
CFG_ADB_DEVICE_STATUS=$(1)
CFG_ANDROID_TARGET_TRIPLE=$(2)
endef
$(foreach target,$(CFG_TARGET), \
@ -119,7 +118,7 @@ $(foreach target,$(CFG_TARGET), \
$(if $(findstring adb,$(CFG_ADB)), \
$(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \
$(info check: android device attached) \
$(eval $(call DEF_ADB_DEVICE_STATUS, true, $(target))), \
$(eval $(call DEF_ADB_DEVICE_STATUS, true)), \
$(info check: android device not attached) \
$(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
), \
@ -136,12 +135,14 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
$(shell $(CFG_ADB) remount 1>/dev/null) \
$(shell $(CFG_ADB) shell rm -r $(CFG_ADB_TEST_DIR) >/dev/null) \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \
$(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
$(foreach crate,$(TARGET_CRATES), \
$(shell $(CFG_ADB) push $(TLIB2_T_$(CFG_ANDROID_TARGET_TRIPLE)_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_$(CFG_ANDROID_TARGET_TRIPLE),$(crate)) \
$(CFG_ADB_TEST_DIR))) \
)
$(foreach target,$(CFG_TARGET), \
$(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \
$(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/$(target)) \
$(foreach crate,$(TARGET_CRATES), \
$(shell $(CFG_ADB) push $(TLIB2_T_$(target)_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_$(target),$(crate)) \
$(CFG_ADB_TEST_DIR)/$(target))), \
)))
else
CFG_ADB_TEST_DIR=
endif
@ -401,7 +402,7 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
$(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
@$$(call E, run: $$< via adb)
$$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \
$$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=./$(2) \
./$$(notdir $$<) \
--logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \
$$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) $(TESTARGS))' \

View File

@ -156,7 +156,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
lldb_version: extract_lldb_version(matches.opt_str("lldb-version")),
android_cross_path: opt_path(matches, "android-cross-path"),
adb_path: opt_str2(matches.opt_str("adb-path")),
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")),
adb_test_dir: format!("{}/{}",
opt_str2(matches.opt_str("adb-test-dir")),
opt_str2(matches.opt_str("target"))),
adb_device_status:
opt_str2(matches.opt_str("target")).contains("android") &&
"(none)" != opt_str2(matches.opt_str("adb-test-dir")) &&

View File

@ -1509,7 +1509,7 @@ fn _arm_exec_compiled_test(config: &Config,
for (key, val) in env {
runargs.push(format!("{}={}", key, val));
}
runargs.push(format!("{}/adb_run_wrapper.sh", config.adb_test_dir));
runargs.push(format!("{}/../adb_run_wrapper.sh", config.adb_test_dir));
runargs.push(format!("{}", config.adb_test_dir));
runargs.push(format!("{}", prog_short));
@ -1605,7 +1605,7 @@ fn _arm_push_aux_shared_library(config: &Config, testfile: &Path) {
file.as_str()
.unwrap()
.to_string(),
config.adb_test_dir.to_string()
config.adb_test_dir.to_string(),
],
vec!(("".to_string(),
"".to_string())),

View File

@ -24,8 +24,9 @@ then
then
shift
# The length of binary path (i.e. ./$RUN) should be shorter than 128 characters.
cd $TEST_PATH
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH $TEST_PATH/$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
TEST_EXEC_ENV=22 LD_LIBRARY_PATH=$TEST_PATH PATH=$BIN_PATH:$TEST_PATH ./$RUN $@ 1>$TEST_PATH/$RUN.stdout 2>$TEST_PATH/$RUN.stderr
L_RET=$?
echo $L_RET > $TEST_PATH/$RUN.exitcode