< prev index next >

make/test/BuildTestLib.gmk

Print this page

 29 # This file builds the Java components of testlib.
 30 # It also covers the test-image part, where the built files are copied to the
 31 # test image.
 32 ################################################################################
 33 
 34 include CopyFiles.gmk
 35 include JavaCompilation.gmk
 36 
 37 ################################################################################
 38 # Targets for building the test lib jars
 39 ################################################################################
 40 
 41 TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
 42 TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
 43 
 44 $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
 45     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 46     SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/, \
 47     BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
 48     JAR := $(TEST_LIB_SUPPORT)/wb.jar, \

 49     JAVAC_FLAGS := --enable-preview, \
 50 ))
 51 
 52 TARGETS += $(BUILD_WB_JAR)
 53 
 54 ifeq ($(call isTargetOs, linux), false)
 55     BUILD_TEST_LIB_JAR_EXCLUDES := jdk/test/lib/containers
 56 endif
 57 
 58 $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
 59     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 60     SRC := $(TEST_LIB_SOURCE_DIR), \
 61     EXCLUDES := $(BUILD_TEST_LIB_JAR_EXCLUDES), \
 62     BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
 63     HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
 64     JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \

 65     JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
 66         --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
 67         --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
 68         --add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
 69         --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
 70         --add-exports java.base/jdk.internal.platform=ALL-UNNAMED \
 71         --add-exports java.base/sun.security.pkcs=ALL-UNNAMED \
 72         --add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED \
 73         --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED \
 74         --add-exports java.base/sun.security.x509=ALL-UNNAMED \






 75         --enable-preview, \
 76 ))
 77 
 78 TARGETS += $(BUILD_TEST_LIB_JAR)
 79 
 80 build-test-lib: $(TARGETS)
 81 
 82 ################################################################################
 83 # Targets for building test-image.
 84 ################################################################################
 85 
 86 # Copy the jars to the test image.
 87 $(eval $(call SetupCopyFiles, COPY_LIBTEST_JARS, \
 88     DEST := $(TEST_IMAGE_DIR)/lib-test, \
 89     FILES := $(BUILD_WB_JAR_JAR) $(BUILD_TEST_LIB_JAR_JAR), \
 90 ))
 91 
 92 test-image-lib: $(COPY_LIBTEST_JARS)
 93 
 94 all: build-test-lib

 29 # This file builds the Java components of testlib.
 30 # It also covers the test-image part, where the built files are copied to the
 31 # test image.
 32 ################################################################################
 33 
 34 include CopyFiles.gmk
 35 include JavaCompilation.gmk
 36 
 37 ################################################################################
 38 # Targets for building the test lib jars
 39 ################################################################################
 40 
 41 TEST_LIB_SOURCE_DIR := $(TOPDIR)/test/lib
 42 TEST_LIB_SUPPORT := $(SUPPORT_OUTPUTDIR)/test/lib
 43 
 44 $(eval $(call SetupJavaCompilation, BUILD_WB_JAR, \
 45     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 46     SRC := $(TEST_LIB_SOURCE_DIR)/jdk/test/whitebox/, \
 47     BIN := $(TEST_LIB_SUPPORT)/wb_classes, \
 48     JAR := $(TEST_LIB_SUPPORT)/wb.jar, \
 49     DISABLED_WARNINGS := preview, \
 50     JAVAC_FLAGS := --enable-preview, \
 51 ))
 52 
 53 TARGETS += $(BUILD_WB_JAR)
 54 
 55 ifeq ($(call isTargetOs, linux), false)
 56     BUILD_TEST_LIB_JAR_EXCLUDES := jdk/test/lib/containers
 57 endif
 58 
 59 $(eval $(call SetupJavaCompilation, BUILD_TEST_LIB_JAR, \
 60     TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
 61     SRC := $(TEST_LIB_SOURCE_DIR), \
 62     EXCLUDES := $(BUILD_TEST_LIB_JAR_EXCLUDES) org, \
 63     BIN := $(TEST_LIB_SUPPORT)/test-lib_classes, \
 64     HEADERS := $(TEST_LIB_SUPPORT)/test-lib_headers, \
 65     JAR := $(TEST_LIB_SUPPORT)/test-lib.jar, \
 66     DISABLED_WARNINGS := try deprecation rawtypes unchecked serial cast removal preview restricted varargs dangling-doc-comments, \
 67     JAVAC_FLAGS := --add-exports java.base/sun.security.util=ALL-UNNAMED \
 68         --add-exports java.base/jdk.internal.classfile=ALL-UNNAMED \
 69         --add-exports java.base/jdk.internal.classfile.attribute=ALL-UNNAMED \
 70         --add-exports java.base/jdk.internal.classfile.constantpool=ALL-UNNAMED \
 71         --add-exports java.base/jdk.internal.module=ALL-UNNAMED \
 72         --add-exports java.base/jdk.internal.platform=ALL-UNNAMED \
 73         --add-exports java.base/sun.security.pkcs=ALL-UNNAMED \
 74         --add-exports java.base/sun.security.provider.certpath=ALL-UNNAMED \
 75         --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED \
 76         --add-exports java.base/sun.security.x509=ALL-UNNAMED \
 77         --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
 78         --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
 79         --add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
 80         --add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
 81         --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
 82         --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
 83         --enable-preview, \
 84 ))
 85 
 86 TARGETS += $(BUILD_TEST_LIB_JAR)
 87 
 88 build-test-lib: $(TARGETS)
 89 
 90 ################################################################################
 91 # Targets for building test-image.
 92 ################################################################################
 93 
 94 # Copy the jars to the test image.
 95 $(eval $(call SetupCopyFiles, COPY_LIBTEST_JARS, \
 96     DEST := $(TEST_IMAGE_DIR)/lib-test, \
 97     FILES := $(BUILD_WB_JAR_JAR) $(BUILD_TEST_LIB_JAR_JAR), \
 98 ))
 99 
100 test-image-lib: $(COPY_LIBTEST_JARS)
101 
102 all: build-test-lib
< prev index next >