From 11d6127f1803e0f418f3a7977d237b509c5d31f9 Mon Sep 17 00:00:00 2001 From: Ingemar Aberg Date: Fri, 9 Jan 2015 16:45:39 +0100 Subject: [PATCH] 8067759: Create initial test bundle framework Reviewed-by: ihse, erikj --- common/autoconf/spec.gmk.in | 5 +++++ make/Jprt.gmk | 15 ++++++++++++++- make/Main.gmk | 12 +++++++++--- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 60d70886925..1c6c1c40132 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -690,10 +690,15 @@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@ # 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 diff --git a/make/Jprt.gmk b/make/Jprt.gmk index 48ae1cf4623..516e5ff615d 100644 --- a/make/Jprt.gmk +++ b/make/Jprt.gmk @@ -35,6 +35,9 @@ ifneq ($(CYGPATH), ) 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 @@ endif 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 @@ $(JPRT_ARCHIVE_BUNDLE): bundles $(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 @@ bundles: all $(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 diff --git a/make/Main.gmk b/make/Main.gmk index 0f705491b0a..a46f1de8508 100644 --- a/make/Main.gmk +++ b/make/Main.gmk @@ -238,8 +238,12 @@ profiles: 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 @@ exploded-image: $(ALL_MODULE_TARGETS) # 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 @@ endif 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 ################################################################################