8067759: Create initial test bundle framework
Reviewed-by: ihse, erikj
This commit is contained in:
parent
b43392d038
commit
11d6127f18
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
################################################################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user