OSDN Git Service

Move ART_HOST_TEST_DIR to Android.common_test.mk
authorDan Willemsen <dwillemsen@google.com>
Sat, 17 Sep 2016 00:11:36 +0000 (17:11 -0700)
committerDan Willemsen <dwillemsen@google.com>
Sat, 17 Sep 2016 00:35:21 +0000 (17:35 -0700)
I'm improving Kati's re-run detection, and this $(shell echo $$PPID) now
now causes us to reparse all of the makefiles every time, since it
really does change on each execution. But if you aren't running the ART
tests, this doesn't actually get used.

So punt this over to only executing when you're including the test
runner -- it's not ideal, since you'll be reparsing the makefiles every
time you want to run the tests. Depending on the desired behavior, this
should be able to be implemented without depending on the PID of Kati,
or the test runner can be moved out of the build system, since most of
the builds here have moved to Soong now.

Bug: 30947985
Test: Compare build.ninja before and after this change, only change is
      the valgrind-test-art-target* targets.
Test: m -j test-art-host
Change-Id: Ibbc0f20e407bf70bce64d3428be5808d78bdaf91

Android.mk
build/Android.common_path.mk
build/Android.common_test.mk
tools/ahat/Android.mk

index a1479e1..3740ed8 100644 (file)
@@ -328,8 +328,6 @@ test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test
        $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
 endif
 
-endif  # art_test_bother
-
 # Valgrind.
 .PHONY: valgrind-test-art-target
 valgrind-test-art-target: valgrind-test-art-target-gtest
@@ -343,6 +341,8 @@ valgrind-test-art-target32: valgrind-test-art-target-gtest32
 valgrind-test-art-target64: valgrind-test-art-target-gtest64
        $(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
 
+endif  # art_test_bother
+
 ########################################################################
 # oat-target and oat-target-sync rules
 
index 00d29b9..e568ce2 100644 (file)
@@ -35,13 +35,6 @@ ART_TARGET_NATIVETEST_OUT := $(TARGET_OUT_DATA_NATIVE_TESTS)/art
 ART_TARGET_TEST_DIR := /data/art-test
 ART_TARGET_TEST_OUT := $(TARGET_OUT_DATA)/art-test
 
-# Directory used for temporary test files on the host.
-ifneq ($(TMPDIR),)
-ART_HOST_TEST_DIR := $(TMPDIR)/test-art-$(shell echo $$PPID)
-else
-ART_HOST_TEST_DIR := /tmp/$(USER)/test-art-$(shell echo $$PPID)
-endif
-
 # core.oat location on the device.
 TARGET_CORE_OAT := $(ART_TARGET_TEST_DIR)/$(DEX2OAT_TARGET_ARCH)/core.oat
 ifdef TARGET_2ND_ARCH
index 6b7dc09..8124ca3 100644 (file)
@@ -19,6 +19,13 @@ ART_ANDROID_COMMON_TEST_MK = true
 
 include art/build/Android.common_path.mk
 
+# Directory used for temporary test files on the host.
+ifneq ($(TMPDIR),)
+ART_HOST_TEST_DIR := $(TMPDIR)/test-art-$(shell echo $$PPID)
+else
+ART_HOST_TEST_DIR := /tmp/$(USER)/test-art-$(shell echo $$PPID)
+endif
+
 # We need to set a define for the nativetest dir so that common_runtime_test will know the right
 # path. (The problem is being a 32b test on 64b device, which is still located in nativetest64).
 ART_TARGET_CFLAGS += -DART_TARGET_NATIVETEST_DIR=${ART_TARGET_NATIVETEST_DIR}
index 60e0cd8..4003ee0 100644 (file)
@@ -16,7 +16,7 @@
 
 LOCAL_PATH := $(call my-dir)
 
-include art/build/Android.common_test.mk
+include art/build/Android.common_path.mk
 
 # --- ahat.jar ----------------
 include $(CLEAR_VARS)