From a491564001724da07ecb7d2e4a070c4abbd92cf5 Mon Sep 17 00:00:00 2001 From: Nizar Benalla Date: Wed, 27 Nov 2024 15:36:26 +0000 Subject: [PATCH] 8342836: Automatically determine that a test in the docs test root is requested Reviewed-by: ihse, erikj --- make/Main.gmk | 6 +++++- make/MainSupport.gmk | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/make/Main.gmk b/make/Main.gmk index 25dfba7d36c..152dbf17cd3 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -1344,9 +1344,13 @@ test-hotspot-jtreg-native: test-hotspot_native_sanity test-hotspot-gtest: exploded-test-gtest test-jdk-jtreg-native: test-jdk_native_sanity +# Set dependencies for doc tests +$(eval $(call AddTestDependency, docs_all, docs-jdk)) +test-docs: test-docs_all + ALL_TARGETS += $(RUN_TEST_TARGETS) run-test exploded-run-test check \ test-hotspot-jtreg test-hotspot-jtreg-native test-hotspot-gtest \ - test-jdk-jtreg-native + test-jdk-jtreg-native test-docs ################################################################################ ################################################################################ diff --git a/make/MainSupport.gmk b/make/MainSupport.gmk index f1027a9b888..ca284e21dd0 100644 --- a/make/MainSupport.gmk +++ b/make/MainSupport.gmk @@ -137,6 +137,15 @@ define CleanModule $(call Clean-include, $1) endef +define AddTestDependency + test-$(strip $1): $2 + + exploded-test-$(strip $1): $2 + + ifneq ($(filter $(TEST), $1), ) + TEST_DEPS += $2 + endif +endef ################################################################################