From 5e87f2f89e36250d2066213c47081e631ead9f5f Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Tue, 20 Aug 2013 16:50:45 +0900 Subject: [PATCH 1/2] Android: Change directory before running tests --- mk/tests.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mk/tests.mk b/mk/tests.mk index e644248c370..a9702aa3250 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -143,8 +143,9 @@ CFG_ADB_TEST_DIR=/data/tmp $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \ $(shell adb remount 1>/dev/null) \ - $(shell adb shell mkdir $(CFG_ADB_TEST_DIR) 1>/dev/null) \ - $(shell adb shell rm -rf $(CFG_ADB_TEST_DIR)/* 1>/dev/null) \ + $(shell adb shell rm -r $(CFG_ADB_TEST_DIR) >/dev/null) \ + $(shell adb shell mkdir $(CFG_ADB_TEST_DIR)) \ + $(shell adb shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \ $(shell adb push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \ $(shell adb push $(CFG_ANDROID_CROSS_PATH)/arm-linux-androideabi/lib/armv7-a/libgnustl_shared.so \ $(CFG_ADB_TEST_DIR) 1>/dev/null) \ @@ -408,10 +409,10 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)) @$$(call E, run: $$< via adb) @$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR) - @$(CFG_ADB) shell LD_LIBRARY_PATH=$(CFG_ADB_TEST_DIR) \ - $(CFG_ADB_TEST_DIR)/`echo $$< | sed 's/.*\///'` \ - --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log > \ - tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp + @$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \ + ./$$(notdir $$<) \ + --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log)' \ + > tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp @cat tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp @touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log @$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/ From 0276fe471a9336763b2aff537d9982004e570d7f Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Tue, 20 Aug 2013 19:07:36 +0900 Subject: [PATCH 2/2] Android: Run benchmarks and copy metrics --- mk/tests.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mk/tests.mk b/mk/tests.mk index a9702aa3250..048e62cca8e 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -411,12 +411,14 @@ $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \ @$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR) @$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \ ./$$(notdir $$<) \ - --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log)' \ + --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \ + $$(call CRATE_TEST_BENCH_ARGS,$(1),$(2),$(3),$(4)))' \ > tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp @cat tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp @touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log @$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/ @$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log + @$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/$$(call TEST_RATCHET_FILE,$(1),$(2),$(3),$(4)) tmp/ @if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \ then \ rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \