8189682: JDK demos/tests should be in a separate bundle than hotspot ones
authorerikj
Tue, 24 Oct 2017 15:36:56 +0200
changeset 47440 963f70aa578d
parent 47439 94943e6674be
child 47441 258dc79d2265
8189682: JDK demos/tests should be in a separate bundle than hotspot ones Reviewed-by: prr, ihse
make/Bundles.gmk
make/autoconf/spec.gmk.in
make/conf/jib-profiles.js
--- a/make/Bundles.gmk	Tue Oct 24 12:07:27 2017 +0200
+++ b/make/Bundles.gmk	Tue Oct 24 15:36:56 2017 +0200
@@ -205,6 +205,8 @@
       ) \
       $(call CacheFind, $(SYMBOLS_IMAGE_DIR))
 
+  TEST_DEMOS_BUNDLE_FILES := $(filter $(JDK_IMAGE_HOMEDIR)/demo/%, $(ALL_JDK_FILES))
+
   ALL_JRE_FILES := $(call CacheFind, $(JRE_IMAGE_DIR))
 
   # Create special filter rules when dealing with unzipped .dSYM directories on
@@ -264,6 +266,17 @@
 
   PRODUCT_TARGETS += $(BUILD_JRE_SYMBOLS_BUNDLE)
 
+  # The demo bundle is only created to support client tests. Ideally it should
+  # be built with the main test bundle, but since the prerequisites match
+  # better with the product build, it makes more sense to keep it there for now.
+  $(eval $(call SetupBundleFile, BUILD_TEST_DEMOS_BUNDLE, \
+      BUNDLE_NAME := $(TEST_DEMOS_BUNDLE_NAME), \
+      FILES := $(TEST_DEMOS_BUNDLE_FILES), \
+      BASE_DIRS := $(JDK_IMAGE_DIR), \
+      SUBDIR := $(JDK_BUNDLE_SUBDIR), \
+  ))
+
+  PRODUCT_TARGETS += $(BUILD_TEST_DEMOS_BUNDLE)
 endif
 
 ################################################################################
--- a/make/autoconf/spec.gmk.in	Tue Oct 24 12:07:27 2017 +0200
+++ b/make/autoconf/spec.gmk.in	Tue Oct 24 15:36:56 2017 +0200
@@ -831,6 +831,7 @@
     jre-$(VERSION_SHORT)+$(VERSION_BUILD)-compact3_$(OPENJDK_TARGET_BUNDLE_PLATFORM)_bin$(DEBUG_PART).tar.gz
 JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
 JRE_SYMBOLS_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
+TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
 TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
 DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
 
@@ -838,6 +839,7 @@
 JRE_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
 JDK_SYMBOLS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
 JRE_SYMBOLS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(JRE_SYMBOLS_BUNDLE_NAME)
+TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
 TEST_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
 DOCS_BUNDLE :=  $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
 
--- a/make/conf/jib-profiles.js	Tue Oct 24 12:07:27 2017 +0200
+++ b/make/conf/jib-profiles.js	Tue Oct 24 15:36:56 2017 +0200
@@ -300,6 +300,14 @@
                     ],
                     exploded: "images/test"
                 },
+                test_demos: {
+                    local: "bundles/\\(jdk.*bin-tests-demos.tar.gz\\)",
+                    remote: [
+                        "bundles/" + pf + "/jdk-" + data.version + "_" + pf + "_bin-tests-demos.tar.gz",
+                        "bundles/" + pf + "/\\1"
+                    ],
+                    exploded: "images/test"
+                },
                 jdk_symbols: {
                     local: "bundles/\\(jdk.*bin-symbols.tar.gz\\)",
                     remote: [