8067759: Create initial test bundle framework

Reviewed-by: ihse, erikj
This commit is contained in:
Ingemar Aberg 2015-01-09 16:45:39 +01:00 committed by Magnus Ihse Bursie
parent b43392d038
commit 11d6127f18
3 changed files with 28 additions and 4 deletions

View File

@ -690,10 +690,15 @@ OS_VERSION_MICRO:=@OS_VERSION_MICRO@
# Images directory definitions # Images directory definitions
JDK_IMAGE_SUBDIR:=jdk JDK_IMAGE_SUBDIR:=jdk
JRE_IMAGE_SUBDIR:=jre JRE_IMAGE_SUBDIR:=jre
# Colon left out to be able to override output dir for bootcycle-images # Colon left out to be able to override output dir for bootcycle-images
JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR) JDK_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_IMAGE_SUBDIR)
JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_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 # Macosx bundles directory definitions
JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents JDK_BUNDLE_SUBDIR=jdk-bundle/jdk$(JDK_VERSION).jdk/Contents
JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents JRE_BUNDLE_SUBDIR=jre-bundle/jre$(JDK_VERSION).jre/Contents

View File

@ -35,6 +35,9 @@ ifneq ($(CYGPATH), )
ifdef JPRT_ARCHIVE_INSTALL_BUNDLE ifdef JPRT_ARCHIVE_INSTALL_BUNDLE
override JPRT_ARCHIVE_INSTALL_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE)) override JPRT_ARCHIVE_INSTALL_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_INSTALL_BUNDLE))
endif endif
ifdef JPRT_ARCHIVE_TEST_BUNDLE
override JPRT_ARCHIVE_TEST_BUNDLE := $(shell $(CYGPATH) -u $(JPRT_ARCHIVE_TEST_BUNDLE))
endif
endif endif
# When running in JPRT these will be provided. Need defaults so that this makefile # When running in JPRT these will be provided. Need defaults so that this makefile
@ -45,13 +48,16 @@ endif
ifndef JPRT_ARCHIVE_INSTALL_BUNDLE ifndef JPRT_ARCHIVE_INSTALL_BUNDLE
JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip JPRT_ARCHIVE_INSTALL_BUNDLE=/tmp/jprt_bundles/product-install.zip
endif endif
ifndef JPRT_ARCHIVE_TEST_BUNDLE
JPRT_ARCHIVE_TEST_BUNDLE=/tmp/jprt_bundles/test-image.zip
endif
ifeq ($(SKIP_BOOT_CYCLE), false) ifeq ($(SKIP_BOOT_CYCLE), false)
jprt_bundle: bootcycle-images jprt_bundle: bootcycle-images
endif endif
# This target must be called in the context of a SPEC file # 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 # This target must be called in the context of a SPEC file
$(JPRT_ARCHIVE_BUNDLE): bundles $(JPRT_ARCHIVE_BUNDLE): bundles
@ -59,8 +65,14 @@ $(JPRT_ARCHIVE_BUNDLE): bundles
$(RM) $@ $(RM) $@
$(CP) $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip $@ $(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_JDK_IMAGE_DIR := $(JDK_IMAGE_DIR)
SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR) SRC_JRE_IMAGE_DIR := $(JRE_IMAGE_DIR)
SRC_TEST_IMAGE_DIR := $(TEST_IMAGE_DIR)
SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR) SRC_JDK_BUNDLE_DIR := $(JDK_BUNDLE_DIR)
SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR) SRC_JRE_BUNDLE_DIR := $(JRE_BUNDLE_DIR)
@ -70,6 +82,7 @@ bundles: all
$(MKDIR) -p $(BUILD_OUTPUT)/bundles $(MKDIR) -p $(BUILD_OUTPUT)/bundles
$(CD) $(SRC_JDK_IMAGE_DIR) && $(ZIP) -y -q -r $(BUILD_OUTPUT)/bundles/$(JDK_IMAGE_SUBDIR).zip . $(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_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 \ if [ -d $(BUILD_OUTPUT)/install/bundles ] ; then \
$(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \ $(CD) $(BUILD_OUTPUT)/install/bundles && $(ZIP) -y -q -r $(JPRT_ARCHIVE_INSTALL_BUNDLE) . ; \
fi fi

View File

@ -238,8 +238,12 @@ profiles:
mac-bundles: mac-bundles:
+($(CD) $(SRC_ROOT)/make && $(MAKE) $(MAKE_ARGS) -f MacBundles.gmk) +($(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 \ 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 # Docs targets
@ -442,7 +446,7 @@ exploded-image: $(ALL_MODULE_TARGETS)
# alias for ease of use. # alias for ease of use.
jdk: exploded-image jdk: exploded-image
images: jimages demos samples zip-security images: test-image jimages demos samples zip-security
ifeq ($(OPENJDK_TARGET_OS), macosx) ifeq ($(OPENJDK_TARGET_OS), macosx)
images: mac-bundles images: mac-bundles
@ -450,9 +454,11 @@ endif
docs: docs-javadoc docs-jvmtidoc docs: docs-javadoc docs-jvmtidoc
test-image: prepare-test-image
ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \ ALL_TARGETS += buildtools gensrc gendata copy java rmic libs launchers \
jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image jdk images \ jdk.jdwp.agent-gensrc $(ALL_MODULE_TARGETS) exploded-image jdk images \
docs docs test-image
################################################################################ ################################################################################