Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
20d4d888
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看板
提交
20d4d888
编写于
11月 19, 2013
作者:
K
ksrini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8023978: [TEST_BUG] launcher tests must exclude platforms without server vm
Reviewed-by: dholmes, mchung
上级
6bb7a48a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
13 deletion
+43
-13
test/tools/launcher/ExecutionEnvironment.java
test/tools/launcher/ExecutionEnvironment.java
+8
-11
test/tools/launcher/Test7029048.java
test/tools/launcher/Test7029048.java
+4
-0
test/tools/launcher/TestHelper.java
test/tools/launcher/TestHelper.java
+31
-2
未找到文件。
test/tools/launcher/ExecutionEnvironment.java
浏览文件 @
20d4d888
...
@@ -89,10 +89,6 @@ public class ExecutionEnvironment extends TestHelper {
...
@@ -89,10 +89,6 @@ public class ExecutionEnvironment extends TestHelper {
static
final
File
testJarFile
=
new
File
(
"EcoFriendly.jar"
);
static
final
File
testJarFile
=
new
File
(
"EcoFriendly.jar"
);
static
final
String
LIBJVM
=
TestHelper
.
isWindows
?
"jvm.dll"
:
"libjvm"
+
(
TestHelper
.
isMacOSX
?
".dylib"
:
".so"
);
public
ExecutionEnvironment
()
{
public
ExecutionEnvironment
()
{
createTestJar
();
createTestJar
();
}
}
...
@@ -192,7 +188,7 @@ public class ExecutionEnvironment extends TestHelper {
...
@@ -192,7 +188,7 @@ public class ExecutionEnvironment extends TestHelper {
tr
=
doExec
(
env
,
javaCmd
,
"-jar"
,
testJarFile
.
getAbsolutePath
());
tr
=
doExec
(
env
,
javaCmd
,
"-jar"
,
testJarFile
.
getAbsolutePath
());
verifyJavaLibraryPathGeneric
(
tr
);
verifyJavaLibraryPathGeneric
(
tr
);
}
else
{
}
else
{
// Solaris
// no override
// no override
env
.
clear
();
env
.
clear
();
env
.
put
(
LD_LIBRARY_PATH
,
LD_LIBRARY_PATH_VALUE
);
env
.
put
(
LD_LIBRARY_PATH
,
LD_LIBRARY_PATH_VALUE
);
...
@@ -236,23 +232,24 @@ public class ExecutionEnvironment extends TestHelper {
...
@@ -236,23 +232,24 @@ public class ExecutionEnvironment extends TestHelper {
}
}
/*
/*
* ensures we have indeed exec'ed the correct vm of choice, all VMs support
* ensures we have indeed exec'ed the correct vm of choice if it exists
* -server, however 32-bit VMs support -client and -server.
*/
*/
@Test
@Test
void
testVmSelection
()
{
void
testVmSelection
()
{
TestResult
tr
=
null
;
TestResult
tr
=
null
;
if
(
is32Bit
)
{
if
(
haveClientVM
)
{
tr
=
doExec
(
javaCmd
,
"-client"
,
"-version"
);
tr
=
doExec
(
javaCmd
,
"-client"
,
"-version"
);
if
(!
tr
.
matches
(
".*Client VM.*"
))
{
if
(!
tr
.
matches
(
".*Client VM.*"
))
{
flagError
(
tr
,
"the expected vm -client did not launch"
);
flagError
(
tr
,
"the expected vm -client did not launch"
);
}
}
}
}
tr
=
doExec
(
javaCmd
,
"-server"
,
"-version"
);
if
(
haveServerVM
)
{
if
(!
tr
.
matches
(
".*Server VM.*"
))
{
tr
=
doExec
(
javaCmd
,
"-server"
,
"-version"
);
flagError
(
tr
,
"the expected vm -server did not launch"
);
if
(!
tr
.
matches
(
".*Server VM.*"
))
{
flagError
(
tr
,
"the expected vm -server did not launch"
);
}
}
}
}
}
...
...
test/tools/launcher/Test7029048.java
浏览文件 @
20d4d888
...
@@ -208,6 +208,10 @@ public class Test7029048 extends TestHelper {
...
@@ -208,6 +208,10 @@ public class Test7029048 extends TestHelper {
System
.
out
.
println
(
"Note: applicable on neither Windows nor MacOSX"
);
System
.
out
.
println
(
"Note: applicable on neither Windows nor MacOSX"
);
return
;
return
;
}
}
if
(!
TestHelper
.
haveServerVM
)
{
System
.
out
.
println
(
"Note: test relies on server vm, not found, exiting"
);
return
;
}
// create our test jar first
// create our test jar first
ExecutionEnvironment
.
createTestJar
();
ExecutionEnvironment
.
createTestJar
();
...
...
test/tools/launcher/TestHelper.java
浏览文件 @
20d4d888
...
@@ -67,11 +67,15 @@ public class TestHelper {
...
@@ -67,11 +67,15 @@ public class TestHelper {
static
final
String
JAVAHOME
=
System
.
getProperty
(
"java.home"
);
static
final
String
JAVAHOME
=
System
.
getProperty
(
"java.home"
);
static
final
String
JAVA_BIN
;
static
final
String
JAVA_BIN
;
static
final
String
JAVA_JRE_BIN
;
static
final
String
JAVA_JRE_BIN
;
static
final
String
JAVA_LIB
;
static
final
String
JAVA_JRE_LIB
;
static
final
boolean
isSDK
=
JAVAHOME
.
endsWith
(
"jre"
);
static
final
boolean
isSDK
=
JAVAHOME
.
endsWith
(
"jre"
);
static
final
String
javaCmd
;
static
final
String
javaCmd
;
static
final
String
javawCmd
;
static
final
String
javawCmd
;
static
final
String
javacCmd
;
static
final
String
javacCmd
;
static
final
String
jarCmd
;
static
final
String
jarCmd
;
static
final
boolean
haveServerVM
;
static
final
boolean
haveClientVM
;
static
final
JavaCompiler
compiler
;
static
final
JavaCompiler
compiler
;
...
@@ -88,6 +92,9 @@ public class TestHelper {
...
@@ -88,6 +92,9 @@ public class TestHelper {
System
.
getProperty
(
"os.name"
,
"unknown"
).
startsWith
(
"SunOS"
);
System
.
getProperty
(
"os.name"
,
"unknown"
).
startsWith
(
"SunOS"
);
static
final
boolean
isLinux
=
static
final
boolean
isLinux
=
System
.
getProperty
(
"os.name"
,
"unknown"
).
startsWith
(
"Linux"
);
System
.
getProperty
(
"os.name"
,
"unknown"
).
startsWith
(
"Linux"
);
static
final
String
LIBJVM
=
isWindows
?
"jvm.dll"
:
"libjvm"
+
(
isMacOSX
?
".dylib"
:
".so"
);
static
final
boolean
isSparc
=
System
.
getProperty
(
"os.arch"
).
startsWith
(
"sparc"
);
static
final
boolean
isSparc
=
System
.
getProperty
(
"os.arch"
).
startsWith
(
"sparc"
);
...
@@ -124,12 +131,19 @@ public class TestHelper {
...
@@ -124,12 +131,19 @@ public class TestHelper {
throw
new
RuntimeException
(
"arch model is not 32 or 64 bit ?"
);
throw
new
RuntimeException
(
"arch model is not 32 or 64 bit ?"
);
}
}
compiler
=
ToolProvider
.
getSystemJavaCompiler
();
compiler
=
ToolProvider
.
getSystemJavaCompiler
();
File
binDir
=
(
isSDK
)
File
binDir
=
(
isSDK
)
?
new
File
((
new
File
(
JAVAHOME
)).
getParentFile
(),
"bin"
)
?
new
File
((
new
File
(
JAVAHOME
)).
getParentFile
(),
"bin"
)
:
new
File
(
JAVAHOME
,
"bin"
);
:
new
File
(
JAVAHOME
,
"bin"
);
JAVA_BIN
=
binDir
.
getAbsolutePath
();
JAVA_BIN
=
binDir
.
getAbsolutePath
();
JAVA_JRE_BIN
=
new
File
((
new
File
(
JAVAHOME
)).
getParentFile
(),
JAVA_JRE_BIN
=
new
File
(
JAVAHOME
,
"bin"
).
getAbsolutePath
();
(
isSDK
)
?
"jre/bin"
:
"bin"
).
getAbsolutePath
();
File
libDir
=
(
isSDK
)
?
new
File
((
new
File
(
JAVAHOME
)).
getParentFile
(),
"lib"
)
:
new
File
(
JAVAHOME
,
"lib"
);
JAVA_LIB
=
libDir
.
getAbsolutePath
();
JAVA_JRE_LIB
=
new
File
(
JAVAHOME
,
"lib"
).
getAbsolutePath
();
File
javaCmdFile
=
(
isWindows
)
File
javaCmdFile
=
(
isWindows
)
?
new
File
(
binDir
,
"java.exe"
)
?
new
File
(
binDir
,
"java.exe"
)
:
new
File
(
binDir
,
"java"
);
:
new
File
(
binDir
,
"java"
);
...
@@ -168,6 +182,21 @@ public class TestHelper {
...
@@ -168,6 +182,21 @@ public class TestHelper {
throw
new
RuntimeException
(
"java <"
+
javacCmd
+
throw
new
RuntimeException
(
"java <"
+
javacCmd
+
"> must exist and should be executable"
);
"> must exist and should be executable"
);
}
}
haveClientVM
=
haveVmVariant
(
"client"
);
haveServerVM
=
haveVmVariant
(
"server"
);
}
private
static
boolean
haveVmVariant
(
String
type
)
{
if
(
isWindows
)
{
File
vmDir
=
new
File
(
JAVA_JRE_BIN
,
type
);
File
jvmFile
=
new
File
(
vmDir
,
LIBJVM
);
return
jvmFile
.
exists
();
}
else
{
File
vmDir
=
new
File
(
JAVA_JRE_LIB
,
type
);
File
vmArchDir
=
new
File
(
vmDir
,
getJreArch
());
File
jvmFile
=
new
File
(
vmArchDir
,
LIBJVM
);
return
jvmFile
.
exists
();
}
}
}
void
run
(
String
[]
args
)
throws
Exception
{
void
run
(
String
[]
args
)
throws
Exception
{
int
passed
=
0
,
failed
=
0
;
int
passed
=
0
,
failed
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录