Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
2af4ea8c
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2af4ea8c
编写于
10月 14, 2019
作者:
D
Daming
提交者:
wu-sheng
10月 14, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support plugin testcases run with optional/bootstap plugins (#3617)
上级
72153230
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
37 addition
and
1 deletion
+37
-1
test/plugin/run.sh
test/plugin/run.sh
+21
-1
test/plugin/runner-helper/src/main/java/org/apache/skywalking/plugin/test/helper/ConfigurationImpl.java
...ache/skywalking/plugin/test/helper/ConfigurationImpl.java
+7
-0
test/plugin/runner-helper/src/main/java/org/apache/skywalking/plugin/test/helper/vo/CaseConfiguration.java
...e/skywalking/plugin/test/helper/vo/CaseConfiguration.java
+9
-0
未找到文件。
test/plugin/run.sh
浏览文件 @
2af4ea8c
...
@@ -146,6 +146,26 @@ if [[ ! -f $supported_version_file ]]; then
...
@@ -146,6 +146,26 @@ if [[ ! -f $supported_version_file ]]; then
exitWithMessage
"cannot found 'support-version.list' in directory
${
scenario_name
}
"
exitWithMessage
"cannot found 'support-version.list' in directory
${
scenario_name
}
"
fi
fi
_agent_home
=
${
agent_home
}
mode
=
`
grep
"runningMode"
${
scenario_home
}
/configuration.yml |sed
-e
"s/
\s
//g"
|awk
-F
:
'{print $2}'
`
if
[[
"
$mode
"
==
"with_optional"
]]
;
then
agent_with_optional_home
=
${
home
}
/workspace/agent_with_optional
if
[[
!
-d
${
agent_with_optional_home
}
]]
;
then
mkdir
-p
${
agent_with_optional_home
}
cp
-r
${
agent_home
}
/
*
${
agent_with_optional_home
}
mv
${
agent_with_optional_home
}
/optional-plugins/
*
${
agent_with_optional_home
}
/plugins/
fi
_agent_home
=
${
agent_with_optional_home
}
elif
[[
"
$mode
"
==
"with_bootstrap"
]]
;
then
agent_with_bootstrap_home
=
${
home
}
/workspace/agent_with_bootstrap
if
[[
!
-d
${
agent_with_bootstrap_home
}
]]
;
then
mkdir
-p
${
agent_with_bootstrap_home
}
cp
-r
${
agent_home
}
/
*
${
agent_with_bootstrap_home
}
mv
${
agent_with_bootstrap_home
}
/bootstrap-plugins/
*
${
agent_with_bootstrap_home
}
/plugins/
fi
_agent_home
=
${
agent_with_bootstrap_home
}
fi
supported_versions
=
`
grep
-v
-E
"^
$|
^#"
${
supported_version_file
}
`
supported_versions
=
`
grep
-v
-E
"^
$|
^#"
${
supported_version_file
}
`
for
version
in
${
supported_versions
}
for
version
in
${
supported_versions
}
do
do
...
@@ -172,7 +192,7 @@ do
...
@@ -172,7 +192,7 @@ do
-Dscenario
.name
=
${
scenario_name
}
\
-Dscenario
.name
=
${
scenario_name
}
\
-Dscenario
.version
=
${
version
}
\
-Dscenario
.version
=
${
version
}
\
-Doutput
.dir
=
${
case_work_base
}
\
-Doutput
.dir
=
${
case_work_base
}
\
-Dagent
.dir
=
${
agent_home
}
\
-Dagent
.dir
=
${
_
agent_home
}
\
-Ddocker
.image.version
=
${
build_id
}
\
-Ddocker
.image.version
=
${
build_id
}
\
${
plugin_runner_helper
}
1>
${
case_work_logs_dir
}
/helper.log
${
plugin_runner_helper
}
1>
${
case_work_logs_dir
}
/helper.log
...
...
test/plugin/runner-helper/src/main/java/org/apache/skywalking/plugin/test/helper/ConfigurationImpl.java
浏览文件 @
2af4ea8c
...
@@ -20,6 +20,7 @@ import java.io.File;
...
@@ -20,6 +20,7 @@ import java.io.File;
import
java.io.FileNotFoundException
;
import
java.io.FileNotFoundException
;
import
java.io.FileReader
;
import
java.io.FileReader
;
import
com.google.common.base.Strings
;
import
org.apache.skywalking.plugin.test.helper.exception.ConfigureFileNotFoundException
;
import
org.apache.skywalking.plugin.test.helper.exception.ConfigureFileNotFoundException
;
import
org.apache.skywalking.plugin.test.helper.util.StringUtils
;
import
org.apache.skywalking.plugin.test.helper.util.StringUtils
;
import
org.apache.skywalking.plugin.test.helper.vo.CaseConfiguration
;
import
org.apache.skywalking.plugin.test.helper.vo.CaseConfiguration
;
...
@@ -37,6 +38,12 @@ public class ConfigurationImpl implements IConfiguration {
...
@@ -37,6 +38,12 @@ public class ConfigurationImpl implements IConfiguration {
this
.
configuration
=
new
Yaml
().
loadAs
(
new
FileReader
(
new
File
(
configureFile
)),
CaseConfiguration
.
class
);
this
.
configuration
=
new
Yaml
().
loadAs
(
new
FileReader
(
new
File
(
configureFile
)),
CaseConfiguration
.
class
);
this
.
scenarioHome
=
System
.
getProperty
(
"scenario.home"
);
this
.
scenarioHome
=
System
.
getProperty
(
"scenario.home"
);
if
(!
Strings
.
isNullOrEmpty
(
this
.
configuration
.
getRunningMode
()))
{
String
runningMode
=
this
.
configuration
.
getRunningMode
();
if
(!
runningMode
.
matches
(
"default|with_optional|with_bootstrap"
))
{
throw
new
RuntimeException
(
"RunningMode ("
+
runningMode
+
") is not defined."
);
}
}
}
}
@Override
@Override
...
...
test/plugin/runner-helper/src/main/java/org/apache/skywalking/plugin/test/helper/vo/CaseConfiguration.java
浏览文件 @
2af4ea8c
...
@@ -30,6 +30,7 @@ public class CaseConfiguration {
...
@@ -30,6 +30,7 @@ public class CaseConfiguration {
private
List
<
String
>
environment
;
private
List
<
String
>
environment
;
private
List
<
String
>
expose
;
private
List
<
String
>
expose
;
private
List
<
String
>
depends_on
;
private
List
<
String
>
depends_on
;
private
String
runningMode
;
public
String
getType
()
{
public
String
getType
()
{
return
type
;
return
type
;
...
@@ -110,4 +111,12 @@ public class CaseConfiguration {
...
@@ -110,4 +111,12 @@ public class CaseConfiguration {
public
void
setDepends_on
(
List
<
String
>
depends_on
)
{
public
void
setDepends_on
(
List
<
String
>
depends_on
)
{
this
.
depends_on
=
depends_on
;
this
.
depends_on
=
depends_on
;
}
}
public
String
getRunningMode
()
{
return
runningMode
;
}
public
void
setRunningMode
(
String
runningMode
)
{
this
.
runningMode
=
runningMode
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录