--- a/make/test/JtregNativeJdk.gmk Thu Mar 15 19:30:58 2018 +0100
+++ b/make/test/JtregNativeJdk.gmk Thu Mar 15 19:33:04 2018 +0100
@@ -41,23 +41,17 @@
# Targets for building the native tests themselves.
################################################################################
-# Add more directories here when needed.
-BUILD_JDK_JTREG_NATIVE_SRC += \
- $(TOPDIR)/test/jdk/native_sanity \
- $(TOPDIR)/test/jdk/java/lang/ClassLoader/nativeLibrary \
- $(TOPDIR)/test/jdk/java/lang/String/nativeEncoding \
- #
-
-ifneq ($(OPENJDK_TARGET_OS), windows)
- BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/FileChannel/directio
- BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel
-endif
+# This might have been added to by a custom extension.
+BUILD_JDK_JTREG_NATIVE_SRC += $(TOPDIR)/test/jdk
BUILD_JDK_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/jdk/jtreg/native
BUILD_JDK_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/jdk/jtreg
+# Platform specific setup
ifeq ($(OPENJDK_TARGET_OS), windows)
+ BUILD_JDK_JTREG_EXCLUDE += libDirectIO.c libInheritedChannel.c
+
WIN_LIB_JAVA := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
BUILD_JDK_JTREG_LIBRARIES_LIBS_libstringPlatformChars := $(WIN_LIB_JAVA)
else
@@ -74,17 +68,18 @@
TYPE := LIBRARY, \
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
+ EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
))
$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_EXECUTABLES, \
TYPE := PROGRAM, \
SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
+ EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
))
build-test-jdk-jtreg-native: $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXECUTABLES)
-
################################################################################
# Targets for building test-image.
################################################################################