Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
46a26da4
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
46a26da4
编写于
1月 04, 2010
作者:
O
ohair
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6911104: Tests do not work with CYGWIN: tools, sun/tools, and com/sun/tools
Reviewed-by: tbell, alanb
上级
43a54397
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
69 addition
and
29 deletion
+69
-29
test/com/sun/tools/attach/ApplicationSetup.sh
test/com/sun/tools/attach/ApplicationSetup.sh
+6
-2
test/com/sun/tools/attach/BasicTests.sh
test/com/sun/tools/attach/BasicTests.sh
+1
-1
test/com/sun/tools/attach/CommonSetup.sh
test/com/sun/tools/attach/CommonSetup.sh
+6
-0
test/com/sun/tools/attach/PermissionTests.sh
test/com/sun/tools/attach/PermissionTests.sh
+2
-2
test/com/sun/tools/attach/ProviderTests.sh
test/com/sun/tools/attach/ProviderTests.sh
+1
-1
test/sun/jvmstat/testlibrary/utils.sh
test/sun/jvmstat/testlibrary/utils.sh
+2
-2
test/sun/tools/common/ApplicationSetup.sh
test/sun/tools/common/ApplicationSetup.sh
+5
-1
test/sun/tools/common/CommonSetup.sh
test/sun/tools/common/CommonSetup.sh
+5
-0
test/sun/tools/jps/jps-help.sh
test/sun/tools/jps/jps-help.sh
+2
-2
test/sun/tools/jstat/jstatHelp.sh
test/sun/tools/jstat/jstatHelp.sh
+2
-2
test/sun/tools/jstat/jstatOptions1.sh
test/sun/tools/jstat/jstatOptions1.sh
+1
-1
test/sun/tools/jstatd/jstatdUsage1.sh
test/sun/tools/jstatd/jstatdUsage1.sh
+2
-2
test/sun/tools/native2ascii/Native2AsciiTests.sh
test/sun/tools/native2ascii/Native2AsciiTests.sh
+6
-4
test/tools/launcher/ChangeDataModel.sh
test/tools/launcher/ChangeDataModel.sh
+9
-6
test/tools/launcher/ClassPathWildCard.sh
test/tools/launcher/ClassPathWildCard.sh
+1
-1
test/tools/launcher/DefaultLocaleTest.sh
test/tools/launcher/DefaultLocaleTest.sh
+17
-1
test/tools/launcher/UnicodeTest.sh
test/tools/launcher/UnicodeTest.sh
+1
-1
未找到文件。
test/com/sun/tools/attach/ApplicationSetup.sh
浏览文件 @
46a26da4
...
...
@@ -49,7 +49,11 @@ startApplication()
# "java" process.
if
[
"
$OS
"
=
"Windows"
]
;
then
sleep
2
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
if
[
"
${
isCygwin
}
"
=
"true"
]
;
then
realpid
=
`
ps
-p
${
pid
}
|
tail
-1
|
awk
'{print $4;}'
`
else
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
fi
pid
=
${
realpid
}
fi
...
...
@@ -57,7 +61,7 @@ startApplication()
attempts
=
0
while
true
;
do
sleep
1
port
=
`
tail
-1
${
OUTPUTFILE
}
`
port
=
`
tail
-1
${
OUTPUTFILE
}
|
sed
-e
's@\\r@@g'
`
if
[
!
-z
"
$port
"
]
;
then
# In case of errors wait time for output to be flushed
sleep
1
...
...
test/com/sun/tools/attach/BasicTests.sh
浏览文件 @
46a26da4
...
...
@@ -48,7 +48,7 @@ failures=0
echo
"Running tests ..."
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
BasicTests
$pid
$agent
$badagent
$redefineagent
2>&1
if
[
$?
!=
0
]
;
then
failures
=
`
expr
$failures
+ 1
`
;
fi
...
...
test/com/sun/tools/attach/CommonSetup.sh
浏览文件 @
46a26da4
...
...
@@ -49,6 +49,12 @@ case "$OS" in
OS
=
"Windows"
FS
=
"
\\
"
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
FS
=
"
\\
"
isCygwin
=
true
;;
*
)
echo
"Unrecognized system!"
exit
1
;
...
...
test/com/sun/tools/attach/PermissionTests.sh
浏览文件 @
46a26da4
...
...
@@ -48,7 +48,7 @@ startApplication
echo
"Deny test"
# deny
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
-Djava
.security.manager
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.deny
\
PermissionTest
$pid
true
2>&1
...
...
@@ -56,7 +56,7 @@ if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
# allow
echo
"Allow test"
$JAVA
-classpath
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
$JAVA
-classpath
"
${
TESTCLASSES
}${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
-Djava
.security.manager
\
-Djava
.security.policy
=
${
TESTSRC
}
/java.policy.allow
\
PermissionTest
$pid
false
2>&1
...
...
test/com/sun/tools/attach/ProviderTests.sh
浏览文件 @
46a26da4
...
...
@@ -46,6 +46,6 @@ $JAR -cf ${TESTCLASSES}/SimpleProvider.jar \
echo
"Running test ..."
$JAVA
-classpath
\
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/SimpleProvider.jar
${
PS
}${
TESTJAVA
}
/lib/tools.jar
\
"
${
TESTCLASSES
}${
PS
}${
TESTCLASSES
}
/SimpleProvider.jar
${
PS
}${
TESTJAVA
}
/lib/tools.jar"
\
ProviderTest
test/sun/jvmstat/testlibrary/utils.sh
浏览文件 @
46a26da4
...
...
@@ -40,7 +40,7 @@ setup() {
OS
=
`
uname
-s
`
case
${
OS
}
in
Windows_
*
)
Windows_
*
|
CYGWIN
*
)
PS
=
";"
FS
=
"
\\
"
;;
...
...
@@ -54,7 +54,7 @@ setup() {
verify_os
()
{
OS
=
`
uname
-s
`
case
${
OS
}
in
Windows_95
|
Windows_98
|
Windows_ME
)
Windows_95
|
Windows_98
|
Windows_ME
|
CYGWIN
*
)
echo
"Test bypassed: jvmstat feature not supported on
${
OS
}
"
exit
0
;;
...
...
test/sun/tools/common/ApplicationSetup.sh
浏览文件 @
46a26da4
...
...
@@ -45,7 +45,11 @@ startApplication()
# "java" process.
if
[
"
$OS
"
=
"Windows"
]
;
then
sleep
2
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
if
[
"
${
isCygwin
}
"
=
"true"
]
;
then
realpid
=
`
ps
-p
${
pid
}
|
tail
-1
|
awk
'{print $4;}'
`
else
realpid
=
`
ps
-o
pid,ppid,comm|grep
${
pid
}
|grep
"java"
|cut
-c1-6
`
fi
pid
=
${
realpid
}
fi
...
...
test/sun/tools/common/CommonSetup.sh
浏览文件 @
46a26da4
...
...
@@ -67,6 +67,11 @@ case "$OS" in
PS
=
";"
OS
=
"Windows"
;;
CYGWIN
*
)
PS
=
";"
OS
=
"Windows"
isCygwin
=
true
;;
*
)
PS
=
":"
;;
...
...
test/sun/tools/jps/jps-help.sh
浏览文件 @
46a26da4
...
...
@@ -35,7 +35,7 @@ JPS="${TESTJAVA}/bin/jps"
rm
-f
jps.out 2>/dev/null
${
JPS
}
-?
>
jps.out 2>&1
diff jps.out
${
TESTSRC
}
/usage.out
diff
-w
jps.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jps -? differ from expected output. Failed."
...
...
@@ -46,7 +46,7 @@ fi
rm
-f
jps.out 2>/dev/null
${
JPS
}
-help
>
jps.out 2>&1
diff jps.out
${
TESTSRC
}
/usage.out
diff
-w
jps.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jps -help differ from expected output. Failed."
...
...
test/sun/tools/jstat/jstatHelp.sh
浏览文件 @
46a26da4
...
...
@@ -35,7 +35,7 @@ JSTAT="${TESTJAVA}/bin/jstat"
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-?
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/usage.out
diff
-w
jstat.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jstat -? differ from expected output. Failed."
...
...
@@ -45,7 +45,7 @@ fi
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-help
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/usage.out
diff
-w
jstat.out
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jstat -help differ from expected output. Failed."
...
...
test/sun/tools/jstat/jstatOptions1.sh
浏览文件 @
46a26da4
...
...
@@ -35,4 +35,4 @@ JSTAT="${TESTJAVA}/bin/jstat"
rm
-f
jstat.out 2>/dev/null
${
JSTAT
}
-options
>
jstat.out 2>&1
diff jstat.out
${
TESTSRC
}
/options1.out
diff
-w
jstat.out
${
TESTSRC
}
/options1.out
test/sun/tools/jstatd/jstatdUsage1.sh
浏览文件 @
46a26da4
...
...
@@ -37,7 +37,7 @@ JSTATD_2_OUT="jstatd_$$_2.out"
${
JSTATD
}
-?
>
${
JSTATD_1_OUT
}
2>&1
diff
${
JSTATD_1_OUT
}
${
TESTSRC
}
/usage.out
diff
-w
${
JSTATD_1_OUT
}
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jstatd -? differs from expected output. Failed."
...
...
@@ -46,7 +46,7 @@ fi
${
JSTATD
}
-help
>
${
JSTATD_2_OUT
}
2>&1
diff
${
JSTATD_2_OUT
}
${
TESTSRC
}
/usage.out
diff
-w
${
JSTATD_2_OUT
}
${
TESTSRC
}
/usage.out
if
[
$?
!=
0
]
then
echo
"Output of jstatd -help differs from expected output. Failed."
...
...
test/sun/tools/native2ascii/Native2AsciiTests.sh
浏览文件 @
46a26da4
...
...
@@ -32,7 +32,7 @@ if [ "${TESTSRC}" = "" ]; then TESTSRC=.; fi
if
[
"
${
TESTJAVA
}
"
=
""
]
;
then
TESTJAVA
=
$1
;
shift
;
fi
case
`
uname
-s
`
in
Windows
*
)
OS
=
Windows
;;
Windows
*
|
CYGWIN
*
)
OS
=
Windows
;;
SunOS|Linux
)
OS
=
Unix
;;
esac
...
...
@@ -45,12 +45,14 @@ check() {
# Strip carriage returns from output when comparing with n2a test output
# on win32 systems
if
[
OS
=
Windows
]
;
then
tr
-d
'\015'
<
$out
>
$out
.1
if
[
${
OS
}
=
Windows
]
;
then
sed
-e
's@\\r@@g'
$out
>
$out
.1
sed
-e
's@\\r@@g'
$expected
>
$out
.expected
else
cp
$out
$out
.1
cp
$expected
$out
.expected
fi
if
(
set
-x
;
diff
-c
$expected
$out
.1
)
;
then
if
(
set
-x
;
diff
-c
$
out
.
expected
$out
.1
)
;
then
echo
"
$bug
passed"
else
echo
"
$bug
failed"
...
...
test/tools/launcher/ChangeDataModel.sh
浏览文件 @
46a26da4
...
...
@@ -29,6 +29,9 @@
OS
=
`
uname
-s
`
;
# To remove CR from output, needed for java apps in CYGWIN, harmless otherwise
SED_CR
=
"sed -e s@
\\
r@@g"
case
"
$OS
"
in
Windows
*
|
CYGWIN
*
)
PATHSEP
=
";"
...
...
@@ -79,10 +82,10 @@ $JAVAC GetDataModel.java
# Verify data model flag for default data model is accepted
DM
=
`
$JAVA
GetDataModel
`
DM
=
`
$JAVA
GetDataModel
|
${
SED_CR
}
`
case
"
$DM
"
in
32
)
DM2
=
`
${
JAVA
}
-d32
GetDataModel
`
DM2
=
`
${
JAVA
}
-d32
GetDataModel
|
${
SED_CR
}
`
if
[
"
${
DM2
}
"
!=
"32"
]
then
echo
"Data model flag -d32 not accepted or had improper effect."
...
...
@@ -91,7 +94,7 @@ case "$DM" in
;;
64
)
DM2
=
`
${
JAVA
}
-d64
GetDataModel
`
DM2
=
`
${
JAVA
}
-d64
GetDataModel
|
${
SED_CR
}
`
if
[
"
${
DM2
}
"
!=
"64"
]
then
echo
"Data model flag -d64 not accepted or had improper effect."
...
...
@@ -227,10 +230,10 @@ then
else
# Negative tests for non-dual mode platforms to ensure the other data model is
# rejected
DM
=
`
$JAVA
GetDataModel
`
DM
=
`
$JAVA
GetDataModel
|
${
SED_CR
}
`
case
"
$DM
"
in
32
)
DM2
=
`
${
JAVA
}
-d64
GetDataModel
`
DM2
=
`
${
JAVA
}
-d64
GetDataModel
|
${
SED_CR
}
`
if
[
"x
${
DM2
}
"
!=
"x"
]
then
echo
"Data model flag -d64 was accepted."
...
...
@@ -239,7 +242,7 @@ else
;;
64
)
DM2
=
`
${
JAVA
}
-d32
GetDataModel
`
DM2
=
`
${
JAVA
}
-d32
GetDataModel
|
${
SED_CR
}
`
if
[
"x
${
DM2
}
"
!=
"x"
]
then
echo
"Data model flag -d32 was accepted."
...
...
test/tools/launcher/ClassPathWildCard.sh
浏览文件 @
46a26da4
...
...
@@ -145,7 +145,7 @@ CreateClassFiles D
OS
=
`
uname
-s
`
case
$OS
in
Windows
*
|
C
ygwin
*
)
Windows
*
|
C
YGWIN
*
)
PATHSEP
=
";"
ExecJava
""
"
${
PATHSEP
}
NOOPDIR"
ExecJava
"w"
"
${
PATHSEP
}
NOOPDIR"
...
...
test/tools/launcher/DefaultLocaleTest.sh
浏览文件 @
46a26da4
...
...
@@ -48,7 +48,7 @@ fi
OS
=
`
uname
`
case
"
$OS
"
in
Windows
*
|
CYGWIN
*
)
Windows
*
)
JAVAC
=
"
${
TESTJAVA
}
/bin/javac -d . "
JAVA
=
"
${
TESTJAVA
}
/bin/java -classpath . "
JAVAW
=
"
${
TESTJAVA
}
/bin/javaw -classpath . "
...
...
@@ -64,6 +64,22 @@ case "$OS" in
echo
"Test passes"
exit
0
;;
CYGWIN
*
)
JAVAC
=
"
${
TESTJAVA
}
/bin/javac -d . "
JAVA
=
"
${
TESTJAVA
}
/bin/java -classpath . "
JAVAW
=
"
${
TESTJAVA
}
/bin/javaw -classpath . "
${
JAVAC
}
${
TESTSRC
}
/DefaultLocaleTest.java
${
JAVA
}
DefaultLocaleTest |
sed
-e
s@
\\
r@@g
>
x.out
${
JAVAW
}
DefaultLocaleTest
`
cat
x.out
`
if
[
$?
-ne
0
]
then
echo
"Test fails"
exit
1
fi
echo
"Test passes"
exit
0
;;
*
)
echo
"Non-windows environment; test vacuously succeeds."
exit
0
;
...
...
test/tools/launcher/UnicodeTest.sh
浏览文件 @
46a26da4
...
...
@@ -54,7 +54,7 @@ mkdir UnicodeTest-src UnicodeTest-classes
echo
"creating test source files"
"
$JAVAC
"
-d
.
"
${
TESTSRC
}
"
/UnicodeTest.java
CLASS_NAME
=
`
"
$JAVA
"
UnicodeTest
`
CLASS_NAME
=
`
"
$JAVA
"
UnicodeTest
|
sed
-e
's@\\r@@g'
`
if
[
"
$CLASS_NAME
"
=
""
]
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录