Change from PPID to CWD to distinguish between different trees
Using PPID to distinguish between multiple concurrent trees being
built was causing the whole build-system to be re-scanned each time we
tried to run an art test. By changing it to be based on CWD ckati
should not need to rescan all mk files as much.
This is a hacky workaround, but the only proper fix is stop using a
test runner built on top of make.
Test: mma -j40 test-art-host-gtest-zip_archive_test64 several times
Bug: 71766439
Change-Id: If17221a74b081ebfec8dbf7076b2cd702861eda9
diff --git a/build/Android.common_test.mk b/build/Android.common_test.mk
index 3d1f434..7fae7f6 100644
--- a/build/Android.common_test.mk
+++ b/build/Android.common_test.mk
@@ -23,10 +23,10 @@
ifneq ($(TMPDIR),)
ART_HOST_TEST_DIR := $(TMPDIR)/test-art-$(shell echo $$PPID)
else
-# Use a BSD checksum calculated from PPID and USER as one of the path
+# Use a BSD checksum calculated from CWD and USER as one of the path
# components for the test output. This should allow us to run tests from
# multiple repositories at the same time.
-ART_HOST_TEST_DIR := /tmp/test-art-$(shell echo $$PPID-${USER} | sum | cut -d ' ' -f1)
+ART_HOST_TEST_DIR := /tmp/test-art-$(shell echo $$CWD-${USER} | sum | cut -d ' ' -f1)
endif
# List of known broken tests that we won't attempt to execute. The test name must be the full