Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
080e06ba
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
080e06ba
编写于
3月 15, 2018
作者:
I
ihse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8199681: Remove boilerplate code from creating native jtreg tests
Reviewed-by: erikj
上级
696318f5
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
34 addition
and
79 deletion
+34
-79
make/common/TestFilesCompilation.gmk
make/common/TestFilesCompilation.gmk
+12
-7
make/test/JtregNativeHotspot.gmk
make/test/JtregNativeHotspot.gmk
+15
-60
make/test/JtregNativeJdk.gmk
make/test/JtregNativeJdk.gmk
+7
-12
未找到文件。
make/common/TestFilesCompilation.gmk
浏览文件 @
080e06ba
...
...
@@ -44,6 +44,7 @@ include NativeCompilation.gmk
# TYPE Must be either PROGRAM or LIBRARY.
# SOURCE_DIRS A list of source directories to search
# OUTPUT_DIR Where to put the resulting files
# EXCLUDE A list of filenames to exclude from compilation
SetupTestFilesCompilation = $(NamedParamsMacroTemplate)
define SetupTestFilesCompilationBody
...
...
@@ -76,19 +77,23 @@ define SetupTestFilesCompilationBody
$1_FILE_LIST := \
$$(shell $$(FIND) $$($1_SOURCE_DIRS) -type f -name "$$($1_PREFIX)*.c")
$1_EXCLUDE_PATTERN := $$(addprefix %/, $$($1_EXCLUDE))
$1_FILTERED_FILE_LIST := $$(filter-out $$($1_EXCLUDE_PATTERN), $$($1_FILE_LIST))
# Setup a compilation for each and every one of them
$$(foreach file, $$($1_FILE_LIST),\
$$(eval name := $$(strip $$(patsubst $$($1_PREFIX)%, %, $$(basename $$(notdir $$(file)))))) \
$$(foreach file, $$($1_FILTERED_FILE_LIST),\
$$(eval name := $$(strip $$(basename $$(notdir $$(file))))) \
$$(eval unprefixed_name := $$(patsubst $$($1_PREFIX)%, %, $$(name))) \
$$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
NAME := $$(name), \
NAME := $$(
unprefixed_
name), \
TYPE := $$($1_COMPILATION_TYPE), \
SRC := $$(patsubst %/,%,$$(dir $$(file))), \
INCLUDE_FILES := $$(notdir $$(file)), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(
$1_PREFIX)$$(
name), \
OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(
$1_PREFIX)$$(
name)), \
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(
$1_PREFIX)$$(
name)), \
LIBS := $$($1_LIBS_$$(
$1_PREFIX)$$(
name)), \
CFLAGS := $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
LDFLAGS := $$($1_LDFLAGS) $$($1_LDFLAGS_$$(name)), \
LIBS := $$($1_LIBS_$$(name)), \
OPTIMIZATION := LOW, \
COPY_DEBUG_SYMBOLS := false, \
STRIP_SYMBOLS := false, \
...
...
make/test/JtregNativeHotspot.gmk
浏览文件 @
080e06ba
...
...
@@ -41,90 +41,45 @@ $(eval $(call IncludeCustomExtension, test/JtregNativeHotspot.gmk))
# Targets for building the native tests themselves.
################################################################################
# Add more directories here when needed.
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/gc/g1/TestJNIWeakG1 \
$(TOPDIR)/test/hotspot/jtreg/gc/stress/TestJNIBlockFullGC \
$(TOPDIR)/test/hotspot/jtreg/gc/stress/gclocker \
$(TOPDIR)/test/hotspot/jtreg/gc/cslocker \
$(TOPDIR)/test/hotspot/jtreg/native_sanity \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/8025979 \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/8033445 \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/checked \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/FindClass \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/PrivateInterfaceMethods \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/ToStringInInterfaceTest \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/CalleeSavedRegisters \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/CallWithJNIWeak \
$(TOPDIR)/test/hotspot/jtreg/runtime/jni/ReturnJNIWeak \
$(TOPDIR)/test/hotspot/jtreg/runtime/modules/getModuleJNI \
$(TOPDIR)/test/hotspot/jtreg/runtime/SameObject \
$(TOPDIR)/test/hotspot/jtreg/runtime/BoolReturn \
$(TOPDIR)/test/hotspot/jtreg/runtime/noClassDefFoundMsg \
$(TOPDIR)/test/hotspot/jtreg/runtime/handshake \
$(TOPDIR)/test/hotspot/jtreg/runtime/RedefineTests \
$(TOPDIR)/test/hotspot/jtreg/compiler/floatingpoint/ \
$(TOPDIR)/test/hotspot/jtreg/compiler/calls \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/lookup \
$(TOPDIR)/test/hotspot/jtreg/compiler/runtime/criticalnatives/argumentcorruption \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/CanGenerateAllClassHook \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetOwnedMonitorStackDepthInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetNamedModule \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/IsModifiableModule \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/AddModuleReads \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/AddModuleExportsAndOpens \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/AddModuleUsesAndProvides \
$(TOPDIR)/test/hotspot/jtreg/testlibrary/jvmti \
$(TOPDIR)/test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.code.test \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/GetModulesInfo \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/ModuleAwareAgents/ClassFileLoadHook \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/ModuleAwareAgents/ClassLoadPrepare \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/ModuleAwareAgents/ThreadStart \
$(TOPDIR)/test/hotspot/jtreg/serviceability/jvmti/StartPhase/AllowedFunctions \
$(TOPDIR)/test/hotspot/jtreg/serviceability/dcmd/jvmti/AttachFailed \
#
# Add conditional directories here when needed.
ifeq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/runtime/libadimalloc.solaris.sparc \
$(TOPDIR)/test/hotspot/jtreg/runtime/ThreadSignalMask
endif
# This might have been added to by a custom extension.
BUILD_HOTSPOT_JTREG_NATIVE_SRC += $(TOPDIR)/test/hotspot/jtreg
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_HOTSPOT_JTREG_NATIVE_SRC += \
$(TOPDIR)/test/hotspot/jtreg/runtime/execstack \
$(TOPDIR)/test/hotspot/jtreg/runtime/jsig \
$(TOPDIR)/test/hotspot/jtreg/runtime/StackGuardPages
BUILD_HOTSPOT_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/hotspot/jtreg/native
BUILD_HOTSPOT_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/hotspot/jtreg
# Platform specific setup
ifneq ($(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH), solaris-sparc)
BUILD_HOTSPOT_JTREG_EXCLUDE += liboverflow.c exeThreadSignalMask.c
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rw := -z noexecstack
BUILD_HOTSPOT_JTREG_LIBRARIES_LDFLAGS_libtest-rwx := -z execstack
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeinvoke := -ljvm -lpthread
BUILD_TEST_invoke_exeinvoke.c_OPTIMIZATION := NONE
BUILD_TEST_
exe
invoke_exeinvoke.c_OPTIMIZATION := NONE
BUILD_HOTSPOT_JTREG_EXECUTABLES_LIBS_exeFPRegs := -ldl
else
BUILD_HOTSPOT_JTREG_EXCLUDE += libtest-rw.c libtest-rwx.c libTestJNI.c \
exeinvoke.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
endif
BUILD_HOTSPOT_JTREG_OUTPUT_DIR := $(OUTPUTDIR)/support/test/hotspot/jtreg/native
BUILD_HOTSPOT_JTREG_IMAGE_DIR := $(TEST_IMAGE_DIR)/hotspot/jtreg
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
TYPE := LIBRARY, \
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
))
$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
TYPE := PROGRAM, \
SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
))
build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES)
...
...
make/test/JtregNativeJdk.gmk
浏览文件 @
080e06ba
...
...
@@ -41,23 +41,17 @@ $(eval $(call IncludeCustomExtension, test/JtregNativeJdk.gmk))
# 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 @@ $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
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.
################################################################################
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录