changeset 1275:394de05938d7

8067759: Create initial test bundle framework Reviewed-by: ihse, erikj Contributed-by: ingemar.aberg@oracle.com
author ihse
date Fri, 09 Jan 2015 16:45:39 +0100
parents ef5c7075496d
children 9cf5345d1ef5
files common/autoconf/spec.gmk.in make/Jprt.gmk make/Main.gmk
diffstat 3 files changed, 28 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/spec.gmk.in	Tue Jan 06 13:55:57 2015 +0000
+++ b/common/autoconf/spec.gmk.in	Fri Jan 09 16:45:39 2015 +0100
@@ -690,10 +690,15 @@
 # Images directory definitions
 JDK_IMAGE_SUBDIR:=jdk
 JRE_IMAGE_SUBDIR:=jre
+
 # Colon left out to be able to override output dir for bootcycle-images
 JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
 JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_IMAGE_SUBDIR)
 
+# Test image, as above
+TEST_IMAGE_SUBDIR:=test
+TEST_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(TEST_IMAGE_SUBDIR)
+
 # Macosx bundles directory definitions
 JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
 JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents
--- a/make/Jprt.gmk	Tue Jan 06 13:55:57 2015 +0000
+++ b/make/Jprt.gmk	Fri Jan 09 16:45:39 2015 +0100
@@ -35,6 +35,9 @@
   ifdef JPRT_ARCHIVE_INSTALL_BUNDLE
     override JPRT_ARCHIVE_INSTALL_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE))
   endif
+  ifdef JPRT_ARCHIVE_TEST_BUNDLE
+    override JPRT_ARCHIVE_TEST_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
+  endif
 endif
 
 # When running in JPRT these will be provided. Need defaults so that this makefile
@@ -45,13 +48,16 @@
 ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
   JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
 endif
+ifndef JPRT_ARCHIVE_TEST_BUNDLE
+  JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
+endif
 
 ifeq ($(SKIP_BOOT_CYCLE), false)
   jprt_bundle: bootcycle-images
 endif
 
 # This target must be called in the context of a SPEC file
-jprt_bundle: $(JPRT_ARCHIVE_BUNDLE)
+jprt_bundle: $(JPRT_ARCHIVE_BUNDLE) $(JPRT_ARCHIVE_TEST_BUNDLE)
 
 # This target must be called in the context of a SPEC file
 $(JPRT_ARCHIVE_BUNDLE): bundles
@@ -59,8 +65,14 @@
 	$(RM) $@
 	$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@
 
+$(JPRT_ARCHIVE_TEST_BUNDLE): bundles
+	$(MKDIR) -p $(@D)
+	$(RM) $@
+	$(CP) $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip $@
+
 SRC_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
 SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
+SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
 SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
 SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
 
@@ -70,6 +82,7 @@
 	$(MKDIR) -p $(BUILD_OUTPUT)/bundles
 	$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip .
 	$(CD) $(SRC_JRE_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JRE_IMAGE_SUBDIR).zip .
+	$(CD) $(SRC_TEST_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(TEST_IMAGE_SUBDIR).zip .
 	if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
 	  $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
 	fi
--- a/make/Main.gmk	Tue Jan 06 13:55:57 2015 +0000
+++ b/make/Main.gmk	Fri Jan 09 16:45:39 2015 +0100
@@ -238,8 +238,12 @@
 mac-bundles:
 	+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk)
 
+prepare-test-image:
+	$(MKDIR) -p $(TEST_IMAGE_DIR)
+	$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
+
 ALL_TARGETS += source-tips bootcycle-images zip-security zip-source strip-binaries \
-    jrtfs-jar jimages profiles mac-bundles
+    jrtfs-jar jimages profiles mac-bundles prepare-test-image
 
 ################################################################################
 # Docs targets
@@ -442,7 +446,7 @@
 # alias for ease of use.
 jdk: exploded-image
 
-images: jimages demos samples zip-security
+images: test-image jimages demos samples zip-security
 
 ifeq ($(OPENJDK_TARGET_OS), macosx)
   images: mac-bundles
@@ -450,9 +454,11 @@
 
 docs: docs-javadoc docs-jvmtidoc
 
+test-image: prepare-test-image
+
 ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
     jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image jdk images \
-    docs
+    docs test-image
 
 ################################################################################