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
$(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
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
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
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}
LOCAL_PATH := $(call my-dir)
-include art/build/Android.common_test.mk
+include art/build/Android.common_path.mk
# --- ahat.jar ----------------
include $(CLEAR_VARS)