Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
bd4ba6be
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bd4ba6be
编写于
9月 12, 2008
作者:
D
dcubed
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
1f95c505
2ed46e34
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
143 addition
and
174 deletion
+143
-174
make/jprt.properties
make/jprt.properties
+6
-0
test/Makefile
test/Makefile
+137
-174
未找到文件。
make/jprt.properties
浏览文件 @
bd4ba6be
...
...
@@ -295,3 +295,9 @@ jprt.test.targets = \
${jprt.my.windows.i586.test.targets},
\
${jprt.my.windows.x64.test.targets}
# The default test/Makefile targets that should be run
# Example:
# jprt.make.rule.test.targets=*-*-*-packtest
#jprt.make.rule.test.targets=*-product-*-packtest
test/Makefile
浏览文件 @
bd4ba6be
#
# Copyright
2006
Sun Microsystems, Inc. All Rights Reserved.
# Copyright
1995-2008
Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -19,17 +19,18 @@
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
# CA 95054 USA or visit www.sun.com if you need additional information or
# have any questions.
#
#
#
#
# Makefile to run
jtreg
# Makefile to run
various jdk tests
#
# Get OS/ARCH specifics
OSNAME
=
$(
shell
uname
-s
)
SLASH_JAVA
=
/java
ifeq
($(OSNAME), SunOS)
PLATFORM
=
solaris
JCT_PLATFORM
=
solaris
ARCH
=
$(
shell
uname
-p
)
ifeq
($(ARCH), i386)
ARCH
=
i586
...
...
@@ -37,203 +38,165 @@ ifeq ($(OSNAME), SunOS)
endif
ifeq
($(OSNAME), Linux)
PLATFORM
=
linux
JCT_PLATFORM
=
linux
ARCH
=
$(
shell
uname
-m
)
ifeq
($(ARCH), i386)
ARCH
=
i586
ARCH
=
i586
endif
endif
ifeq
($(OSNAME), Windows_NT)
PLATFORM
=
windows
JCT_PLATFORM
=
win32
SLASH_JAVA
=
J:
ifeq
($(word 1, $(PROCESSOR_IDENTIFIER)),ia64)
ARCH
=
ia64
ARCH
=
ia64
else
ifeq
($(word 1, $(PROCESSOR_IDENTIFIER)),AMD64)
ARCH
=
x64
ARCH
=
x64
else
ifeq
($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
ARCH
=
x64
ARCH
=
x64
else
ARCH
=
i586
ARCH
=
i586
endif
endif
endif
EXESUFFIX
=
.exe
endif
# Default bundle of all test results (passed or not)
JPRT_ARCHIVE_BUNDLE
=
$(TEST_ROOT)
/JPRT_ARCHIVE_BUNDLE.zip
# Utilities used
CD
=
cd
CP
=
cp
ECHO
=
echo
MKDIR
=
mkdir
ZIP
=
zip
# Default home for JTREG
ifeq
($(PLATFORM), windows)
JT_HOME
=
J:/svc/jct-tools3.2.2_01
else
JT_HOME
=
/java/svc/jct-tools3.2.2_01
# Root of this test area (important to use full paths in some places)
TEST_ROOT
:=
$(
shell
pwd
)
# Root of all test results
ABS_BUILD_ROOT
=
$(TEST_ROOT)
/../build/
$(PLATFORM)
-
$(ARCH)
ABS_TEST_OUTPUT_DIR
=
$(ABS_BUILD_ROOT)
/testoutput
# Expect JPRT to set PRODUCT_HOME (the product or jdk in this case to test)
ifndef
PRODUCT_HOME
# Try to use j2sdk-image if it exists
ABS_JDK_IMAGE
=
$(ABS_BUILD_ROOT)
/j2sdk-image
PRODUCT_HOME
:=
\
$(
shell
\
if
[
-d
$(ABS_JDK_IMAGE)
]
;
then
\
$(ECHO)
"
$(ABS_JDK_IMAGE)
"
;
\
else
\
$(ECHO)
"
$(ABS_BUILD_ROOT)
"
;
\
fi
)
endif
# Default JTREG to run
JTREG
=
$(JT_HOME)
/
$(JCT_PLATFORM)
/bin/jtreg
# Expect JPRT to set JAVA_ARGS (e.g. -server etc.)
JAVA_OPTIONS
=
ifdef
JAVA_ARGS
JAVA_OPTIONS
=
$(JAVA_ARGS)
endif
# Root of this test area
TEST_ROOT
:=
$(
shell
pwd
)
# Expect JPRT to set JPRT_ARCHIVE_BUNDLE (path to zip bundle for results)
ARCHIVE_BUNDLE
=
$(ABS_TEST_OUTPUT_DIR)
/ARCHIVE_BUNDLE.zip
ifdef
JPRT_ARCHIVE_BUNDLE
ARCHIVE_BUNDLE
=
$(JPRT_ARCHIVE_BUNDLE)
endif
# Default JDK to test
JAVA_HOME
=
$(TEST_ROOT)
/../build/
$(PLATFORM)
-
$(ARCH)
# How to create the test bundle (pass or fail, we want to create this)
BUNDLE_UP
=
(
$(MKDIR)
-p
`
dirname
$(ARCHIVE_BUNDLE)
`
\
&&
$(CD)
$(ABS_TEST_OUTPUT_DIR)
\
&&
$(ZIP)
-q
-r
$(ARCHIVE_BUNDLE)
.
)
BUNDLE_UP_FAILED
=
(
exitCode
=
$$
?
&&
$(BUNDLE_UP)
&&
exit
$
${exitCode}
)
# The test directories to run
DEFAULT_TESTDIRS
=
serviceability
TESTDIRS
=
$(DEFAULT_TESTDIRS)
################################################################
# Files that hold total passed and failed counts (passed==0 is bad)
JTREG_TOTALS_DIR
=
$(TEST_ROOT)
/JTREG_TOTALS_
$(PLATFORM)
_
$(ARCH)
JTREG_FAILED
=
$(JTREG_TOTALS_DIR)
/failed_count
JTREG_PASSED
=
$(JTREG_TOTALS_DIR)
/passed_count
# Default make rule (runs jtreg_tests)
all
:
jtreg_tests
@
$(ECHO)
"Testing completed successfully"
# Root of all test results
JTREG_ALL_OUTPUT_DIRNAME
=
JTREG_OUTPUT_
$(PLATFORM)
_
$(ARCH)
JTREG_ALL_OUTPUT_DIR
=
$(TEST_ROOT)
/
$(JTREG_ALL_OUTPUT_DIRNAME)
# Test results for one test directory
JTREG_TEST_OUTPUT_DIR
=
$(JTREG_ALL_OUTPUT_DIR)
/
$@
JTREG_TEST_REPORT_DIR
=
$(JTREG_TEST_OUTPUT_DIR)
/JTreport
JTREG_TEST_WORK_DIR
=
$(JTREG_TEST_OUTPUT_DIR)
/JTwork
JTREG_TEST_SUMMARY
=
$(JTREG_TEST_REPORT_DIR)
/summary.txt
# Temp files used by this Makefile
JTREG_TEST_TEMP_DIR
=
$(JTREG_ALL_OUTPUT_DIR)
/
$@
/temp
JTREG_TEMP_PASSED
=
$(JTREG_TEST_TEMP_DIR)
/passed
JTREG_TEMP_FAILED
=
$(JTREG_TEST_TEMP_DIR)
/failed
JTREG_TEMP_OUTPUT
=
$(JTREG_TEST_TEMP_DIR)
/output
JTREG_TEMP_RESULTS
=
$(JTREG_TEST_TEMP_DIR)
/results
# JTREG options (different for 2.1.6 and 3.2.2_01)
JTREG_COMMON_OPTIONS
=
-r
:
$(JTREG_TEST_REPORT_DIR)
\
-w
:
$(JTREG_TEST_WORK_DIR)
\
-testjdk
:
$(JAVA_HOME)
\
-automatic
\
-verbose
:all
JTREG_216_OPTIONS
=
$(JTREG_COMMON_OPTIONS)
$@
$(JAVA_ARGS)
JTREG_322_OPTIONS
=
$(JTREG_COMMON_OPTIONS)
$
(
JAVA_ARGS:%
=
-vmoption
:%
)
$@
# Default make rule
all
:
clean check tests
# Chaeck to make sure these directories exist
check
:
$(JT_HOME) $(JAVA_HOME) $(JTREG)
# Prime the test run
primecounts
:
FRC
@
rm
-f
-r
$(JTREG_TOTALS_DIR)
@
mkdir
-p
$(JTREG_TOTALS_DIR)
@
echo
"0"
>
$(JTREG_FAILED)
@
echo
"0"
>
$(JTREG_PASSED)
# Run the tests and determine the 'make' command exit status
# Ultimately we determine the make exit code based on the passed/failed count
tests
:
primecounts $(TESTDIRS)
@
echo
"JTREG TOTAL: passed=
`
cat
$(JTREG_PASSED)
`
failed=
`
cat
$(JTREG_FAILED)
`
"
zip
-q
-r
$(JPRT_ARCHIVE_BUNDLE)
$(JTREG_ALL_OUTPUT_DIRNAME)
@
if
[
`
cat
$(JTREG_FAILED)
`
-ne
0
-o
\
`
cat
$(JTREG_PASSED)
`
-le
0
]
;
then
\
echo
"JTREG FAILED"
;
\
exit
1
;
\
else
\
echo
"JTREG PASSED"
;
\
exit
0
;
\
fi
# Just make sure these directires exist
$(JT_HOME) $(JAVA_HOME)
:
FRC
@
if
[
!
-d
$@
]
;
then
\
echo
"ERROR: Directory
$@
does not exist"
;
\
exit
1
;
\
fi
# Make sure this file exists
$(JTREG)
:
FRC
@
if
[
!
-f
$@
]
;
then
\
echo
"ERROR: File
$@
does not exist"
;
\
exit
1
;
\
fi
# Process each test directory one by one, this rule always completes.
# Note that the use of 'tee' tosses the jtreg process exit status, this
# is as expected because even if jtreg fails, we need to save the
# output. So we update the JTREG_PASSED and JTREG_FAILED count files.
# Note that missing the 'results:' line in the last few lines of output
# will indicate a failure (or a bump by one of the JTREG_FAILED file.
# Note that passed: 0 or no passed: indication means a failure.
# Note that any indication of the word 'failed' indicates failure.
# Ultimately if the contents of JTREG_FAILED is not 0, we have failed
# tests, and if the contents of JTREG_PASSED is 0, we consider that a
# failure.
$(TESTDIRS)
:
FRC
@
if
[
!
-d
$@
]
;
then
\
echo
"ERROR: Directory
$@
does not exist"
;
\
exit
1
;
\
fi
@
echo
"---------------------------------------------------"
@
rm
-f
-r
$(JTREG_TEST_OUTPUT_DIR)
@
mkdir
-p
$(JTREG_TEST_OUTPUT_DIR)
@
mkdir
-p
$(JTREG_TEST_WORK_DIR)
@
mkdir
-p
$(JTREG_TEST_WORK_DIR)
/scratch
@
mkdir
-p
$(JTREG_TEST_REPORT_DIR)
@
mkdir
-p
$(JTREG_TEST_TEMP_DIR)
@
echo
"Testing
$@
"
@
echo
"Using JAVA_HOME=
$(JAVA_HOME)
"
@
echo
"Using JAVA_ARGS=
$(JAVA_ARGS)
"
@
if
[
"
`
$(JTREG)
-help
2>&1 | fgrep
--
-vmoption
`
"
!=
""
]
;
then
\
echo
"Assume we are using jtreg 3.2.2_01 or newer"
;
\
echo
"
$(JTREG)
$(JTREG_322_OPTIONS)
"
;
\
$(JTREG)
$(JTREG_322_OPTIONS)
2>&1 |
tee
$(JTREG_TEMP_OUTPUT)
;
\
else
\
echo
"Assume we are using jtreg 2.1.6"
;
\
echo
"
$(JTREG)
$(JTREG_216_OPTIONS)
"
;
\
$(JTREG)
$(JTREG_216_OPTIONS)
2>&1 |
tee
$(JTREG_TEMP_OUTPUT)
;
\
fi
@
echo
"---------------------------------------------------"
@
echo
"Extracting passed and failed counts from jtreg output"
@
tail
-10
$(JTREG_TEMP_OUTPUT)
| fgrep
-i
'results:'
|
\
tail
-1
|
tee
$(JTREG_TEMP_RESULTS)
@
sed
-e
's@.*\ passed:\ \([1-9][0-9]*\).*@\1@'
$(JTREG_TEMP_RESULTS)
\
>
$(JTREG_TEMP_PASSED)
@
if
[
"
`
cat
$(JTREG_TEMP_PASSED)
`
"
=
""
]
;
then
\
echo
"ERROR: No passed indication in results"
;
\
expr
`
cat
$(JTREG_FAILED)
`
'+'
1
>
$(JTREG_FAILED)
;
\
elif
[
`
cat
$(JTREG_TEMP_PASSED)
`
-le
0
]
;
then
\
echo
"ERROR: Passed count appears to be 0"
;
\
expr
`
cat
$(JTREG_FAILED)
`
'+'
1
>
$(JTREG_FAILED)
;
\
elif
[
"
`
fgrep
-i
failed
$(JTREG_TEMP_RESULTS)
`
"
=
""
]
;
then
\
echo
"No indication anything failed"
;
\
expr
`
cat
$(JTREG_PASSED)
`
'+'
`
cat
$(JTREG_TEMP_PASSED)
`
\
>
$(JTREG_PASSED)
;
\
else
\
sed
-e
's@.*\ failed:\ \([1-9][0-9]*\).*@\1@'
$(JTREG_TEMP_FAILED)
\
>
$(JTREG_TEMP_FAILED)
;
\
if
[
"
`
cat
$(JTREG_TEMP_FAILED)
`
"
=
""
]
;
then
\
echo
"ERROR: Failed pattern but no failed count in results"
;
\
expr
`
cat
$(JTREG_FAILED)
`
'+'
1
>
$(JTREG_FAILED)
;
\
elif
[
`
cat
$(JTREG_TEMP_FAILED)
`
-le
0
]
;
then
\
echo
"ERROR: Failed count is 0, did something failed or not?"
;
\
expr
`
cat
$(JTREG_FAILED)
`
'+'
1
>
$(JTREG_FAILED)
;
\
else
\
expr
`
cat
$(JTREG_FAILED)
`
'+'
`
cat
$(JTREG_TEMP_FAILED)
`
\
>
$(JTREG_FAILED)
;
\
fi
;
\
fi
@
echo
"---------------------------------------------------"
@
echo
"Summary: "
@
if
[
-f
$(JTREG_TEST_SUMMARY)
]
;
then
\
cat
$(JTREG_TEST_SUMMARY)
;
\
else
\
echo
"ERROR: Missing
$(JTREG_TEST_SUMMARY)
"
;
\
fi
@
echo
"---------------------------------------------------"
# Prep for output
prep
:
clean
@
$(MKDIR)
-p
$(ABS_TEST_OUTPUT_DIR)
@
$(MKDIR)
-p
`
dirname
$(ARCHIVE_BUNDLE)
`
# Cleanup
clean
:
rm
-f
-r
$(JTREG_ALL_OUTPUT_DIR)
rm
-f
$(JPRT_ARCHIVE_BUNDLE)
$(RM)
-r
$(ABS_TEST_OUTPUT_DIR)
$(RM)
$(ARCHIVE_BUNDLE)
################################################################
# jtreg tests
# Expect JT_HOME to be set for jtreg tests. (home for jtreg)
JT_HOME
=
$(SLASH_JAVA)
/re/jtreg/4.0/promoted/latest/binaries/jtreg
ifdef
JPRT_JTREG_HOME
JT_HOME
=
$(JPRT_JTREG_HOME)
endif
# Expect JPRT to set TESTDIRS to the jtreg test dirs
JTREG_TESTDIRS
=
demo/jvmti/gctest demo/jvmti/hprof
ifdef
TESTDIRS
JTREG_TESTDIRS
=
$(TESTDIRS)
endif
# Default JTREG to run (win32 script works for everybody)
JTREG
=
$(JT_HOME)
/win32/bin/jtreg
# Option to tell jtreg to not run tests marked with "ignore"
ifeq
($(PLATFORM), windows)
JTREG_KEY_OPTION
=
-k
:!ignore
else
JTREG_KEY_OPTION
=
-k
:
\!
ignore
endif
#EXTRA_JTREG_OPTIONS =
jtreg_tests
:
prep $(JT_HOME) $(PRODUCT_HOME) $(JTREG)
$(JTREG)
-a
-v
:fail,error
\
$(JTREG_KEY_OPTION)
\
$(EXTRA_JTREG_OPTIONS)
\
-r
:
$(ABS_TEST_OUTPUT_DIR)
/JTreport
\
-w
:
$(ABS_TEST_OUTPUT_DIR)
/JTwork
\
-jdk
:
$(PRODUCT_HOME)
\
$
(
JAVA_OPTIONS:%
=
-vmoption
:%
)
\
$(JTREG_TESTDIRS)
\
||
$(BUNDLE_UP_FAILED)
$(BUNDLE_UP)
PHONY_LIST
+=
jtreg_tests
################################################################
# packtest
# Expect JPRT to set JPRT_PACKTEST_HOME.
PACKTEST_HOME
=
/net/jprt-web.sfbay.sun.com/jprt/allproducts/packtest
ifdef
JPRT_PACKTEST_HOME
PACKTEST_HOME
=
$(JPRT_PACKTEST_HOME)
endif
#EXTRA_PACKTEST_OPTIONS =
packtest
:
prep $(PACKTEST_HOME)/ptest $(PRODUCT_HOME)
(
$(CD)
$(PACKTEST_HOME)
&&
\
$(PACKTEST_HOME)
/ptest
\
-t
"
$(PRODUCT_HOME)
"
\
$(PACKTEST_STRESS_OPTION)
\
$(EXTRA_PACKTEST_OPTIONS)
\
-W
$(ABS_TEST_OUTPUT_DIR)
\
$
(
JAVA_OPTIONS:%
=
-J
%
)
\
)
||
$(BUNDLE_UP_FAILED)
$(BUNDLE_UP)
packtest_stress
:
PACKTEST_STRESS_OPTION=-s
packtest_stress
:
packtest
PHONY_LIST
+=
packtest packtest_stress
################################################################
# Phony targets (e.g. these are not filenames)
.PHONY
:
all clean prep $(PHONY_LIST)
FRC
:
################################################################
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录