Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
74a9de14
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看板
提交
74a9de14
编写于
9月 17, 2013
作者:
C
ctornqvi
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
d63e791e
5fe77ae1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
59 addition
and
33 deletion
+59
-33
test/TEST.groups
test/TEST.groups
+0
-11
test/gc/TestVerifyDuringStartup.java
test/gc/TestVerifyDuringStartup.java
+1
-1
test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java
...estlibrary/com/oracle/java/testlibrary/JDKToolFinder.java
+58
-21
未找到文件。
test/TEST.groups
浏览文件 @
74a9de14
...
@@ -72,18 +72,7 @@ needs_jdk = \
...
@@ -72,18 +72,7 @@ needs_jdk = \
runtime/7194254/Test7194254.java \
runtime/7194254/Test7194254.java \
runtime/jsig/Test8017498.sh \
runtime/jsig/Test8017498.sh \
runtime/Metaspace/FragmentMetaspace.java \
runtime/Metaspace/FragmentMetaspace.java \
runtime/NMT/BaselineWithParameter.java \
runtime/NMT/JcmdScale.java \
runtime/NMT/JcmdWithNMTDisabled.java \
runtime/NMT/MallocTestType.java \
runtime/NMT/ReleaseCommittedMemory.java \
runtime/NMT/ReleaseCommittedMemory.java \
runtime/NMT/ShutdownTwice.java \
runtime/NMT/SummaryAfterShutdown.java \
runtime/NMT/SummarySanityCheck.java \
runtime/NMT/ThreadedMallocTestType.java \
runtime/NMT/ThreadedVirtualAllocTestType.java \
runtime/NMT/VirtualAllocTestType.java \
runtime/RedefineObject/TestRedefineObject.java \
serviceability/attach/AttachWithStalePidFile.java
serviceability/attach/AttachWithStalePidFile.java
# JRE adds further tests to compact3
# JRE adds further tests to compact3
...
...
test/gc/TestVerifyDuringStartup.java
浏览文件 @
74a9de14
...
@@ -48,7 +48,7 @@ public class TestVerifyDuringStartup {
...
@@ -48,7 +48,7 @@ public class TestVerifyDuringStartup {
"-XX:+VerifyDuringStartup"
,
"-XX:+VerifyDuringStartup"
,
"-version"
});
"-version"
});
System
.
out
.
print
(
"Testing:\n"
+
JDKToolFinder
.
get
Current
JDKTool
(
"java"
));
System
.
out
.
print
(
"Testing:\n"
+
JDKToolFinder
.
getJDKTool
(
"java"
));
for
(
int
i
=
0
;
i
<
vmOpts
.
size
();
i
+=
1
)
{
for
(
int
i
=
0
;
i
<
vmOpts
.
size
();
i
+=
1
)
{
System
.
out
.
print
(
" "
+
vmOpts
.
get
(
i
));
System
.
out
.
print
(
" "
+
vmOpts
.
get
(
i
));
}
}
...
...
test/testlibrary/com/oracle/java/testlibrary/JDKToolFinder.java
浏览文件 @
74a9de14
...
@@ -23,7 +23,9 @@
...
@@ -23,7 +23,9 @@
package
com.oracle.java.testlibrary
;
package
com.oracle.java.testlibrary
;
import
java.io.File
;
import
java.io.FileNotFoundException
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
public
final
class
JDKToolFinder
{
public
final
class
JDKToolFinder
{
...
@@ -32,38 +34,73 @@ public final class JDKToolFinder {
...
@@ -32,38 +34,73 @@ public final class JDKToolFinder {
/**
/**
* Returns the full path to an executable in jdk/bin based on System
* Returns the full path to an executable in jdk/bin based on System
* property {@code
compile.jdk} (set by
jtreg test suite)
* property {@code
test.jdk} or {@code compile.jdk} (both are set by the
jtreg test suite)
*
*
* @return Full path to an executable in jdk/bin
* @return Full path to an executable in jdk/bin
*/
*/
public
static
String
getJDKTool
(
String
tool
)
{
public
static
String
getJDKTool
(
String
tool
)
{
String
binPath
=
System
.
getProperty
(
"compile.jdk"
);
if
(
binPath
==
null
)
{
// First try to find the executable in test.jdk
throw
new
RuntimeException
(
"System property 'compile.jdk' not set. "
try
{
+
"This property is normally set by jtreg. "
return
getTool
(
tool
,
"test.jdk"
);
+
"When running test separately, set this property using "
}
catch
(
FileNotFoundException
e
)
{
+
"'-Dcompile.jdk=/path/to/jdk'."
);
}
}
binPath
+=
File
.
separatorChar
+
"bin"
+
File
.
separatorChar
+
tool
;
return
binPath
;
// Now see if it's available in compile.jdk
try
{
return
getTool
(
tool
,
"compile.jdk"
);
}
catch
(
FileNotFoundException
e
)
{
throw
new
RuntimeException
(
"Failed to find "
+
tool
+
", looked in test.jdk ("
+
System
.
getProperty
(
"test.jdk"
)
+
") and compile.jdk ("
+
System
.
getProperty
(
"compile.jdk"
)
+
")"
);
}
}
/**
* Returns the full path to an executable in jdk/bin based on System
* property {@code compile.jdk}
*
* @return Full path to an executable in jdk/bin
*/
public
static
String
getCompileJDKTool
(
String
tool
)
{
try
{
return
getTool
(
tool
,
"compile.jdk"
);
}
catch
(
FileNotFoundException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
/**
/**
* Returns the full path to an executable in
<current jdk>/bin based
* Returns the full path to an executable in
jdk/bin based on System
*
on System property {@code test.jdk} (set by jtreg test suite)
*
property {@code test.jdk}
*
*
* @return Full path to an executable in jdk/bin
* @return Full path to an executable in jdk/bin
*/
*/
public
static
String
getCurrentJDKTool
(
String
tool
)
{
public
static
String
getTestJDKTool
(
String
tool
)
{
String
binPath
=
System
.
getProperty
(
"test.jdk"
);
try
{
if
(
binPath
==
null
)
{
return
getTool
(
tool
,
"test.jdk"
);
throw
new
RuntimeException
(
"System property 'test.jdk' not set. "
}
catch
(
FileNotFoundException
e
)
{
+
"This property is normally set by jtreg. "
throw
new
RuntimeException
(
e
);
+
"When running test separately, set this property using "
}
+
"'-Dtest.jdk=/path/to/jdk'."
);
}
private
static
String
getTool
(
String
tool
,
String
property
)
throws
FileNotFoundException
{
String
jdkPath
=
System
.
getProperty
(
property
);
if
(
jdkPath
==
null
)
{
throw
new
RuntimeException
(
"System property '"
+
property
+
"' not set. This property is normally set by jtreg. "
+
"When running test separately, set this property using '-D"
+
property
+
"=/path/to/jdk'."
);
}
Path
toolName
=
Paths
.
get
(
"bin"
,
tool
+
(
Platform
.
isWindows
()
?
".exe"
:
""
));
Path
jdkTool
=
Paths
.
get
(
jdkPath
,
toolName
.
toString
());
if
(!
jdkTool
.
toFile
().
exists
())
{
throw
new
FileNotFoundException
(
"Could not find file "
+
jdkTool
.
toAbsolutePath
());
}
}
binPath
+=
File
.
separatorChar
+
"bin"
+
File
.
separatorChar
+
tool
;
return
binPath
;
return
jdkTool
.
toAbsolutePath
().
toString
()
;
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录