Builds boot-test-harness.img, if INSTALLED_BOOTIMAGE_TARGET.
Similar to commit Ic887ea93d4c5181eca0f82c3cdf3ce3b72f4c185
for boot-debug.img, we should also only build boot-test-harness.img
if boot.img exists.
Bug: 184365242
Test: tree hugger
Change-Id: Ie0d9e460905d488e418cf4ee1bd44e6e7c58470d
diff --git a/core/Makefile b/core/Makefile
index 8a512c0..e4482a4 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -2527,6 +2527,7 @@
#
# Note: it's intentional to skip signing for boot-test-harness.img, because it
# can only be used if the device is unlocked with verification error.
+ifneq ($(INSTALLED_BOOTIMAGE_TARGET),)
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
ifneq ($(strip $(BOARD_KERNEL_BINARIES)),)
@@ -2567,6 +2568,7 @@
$(foreach b,$(INSTALLED_TEST_HARNESS_BOOTIMAGE_TARGET),$(call build-boot-test-harness-target,$b))
endif # TARGET_NO_KERNEL
+endif # INSTALLED_BOOTIMAGE_TARGET
endif # BOARD_BUILD_SYSTEM_ROOT_IMAGE is not true
# Creates a compatibility symlink between two partitions, e.g. /system/vendor to /vendor