Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
a9dd6053
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a9dd6053
编写于
5月 08, 2018
作者:
C
Ciju John
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix and enable test nodeos_run_remote_test.
上级
7ec375fc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
5 deletion
+13
-5
tests/CMakeLists.txt
tests/CMakeLists.txt
+1
-1
tests/nodeos_run_remote_test.py
tests/nodeos_run_remote_test.py
+9
-3
tests/testUtils.py
tests/testUtils.py
+3
-1
未找到文件。
tests/CMakeLists.txt
浏览文件 @
a9dd6053
...
...
@@ -39,7 +39,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/consensus-validation-malicious-produc
#To run plugin_test with all log from blockchain displayed, put --verbose after --, i.e. plugin_test -- --verbose
add_test
(
NAME plugin_test COMMAND plugin_test --report_level=detailed --color_output
)
add_test
(
NAME nodeos_run_test COMMAND tests/nodeos_run_test.py -v --only-bios --dump-error-detail WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
# TODO removed on slim: add_test(NAME nodeos_run_remote_test COMMAND tests/nodeos_run_remote_test.py -v
--dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
add_test
(
NAME nodeos_run_remote_test COMMAND tests/nodeos_run_remote_test.py -v --only-bios
--dump-error-detail WORKING_DIRECTORY
${
CMAKE_BINARY_DIR
}
)
# TODO removed on slim: add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
#if(BUILD_MONGO_DB_PLUGIN)
# add_test(NAME nodeos_run_test-mongodb COMMAND tests/nodeos_run_test.py --mongodb -v --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
...
...
tests/nodeos_run_remote_test.py
浏览文件 @
a9dd6053
...
...
@@ -14,6 +14,7 @@ def errorExit(msg="", errorCode=1):
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"-v"
,
help
=
"verbose"
,
action
=
'store_true'
)
parser
.
add_argument
(
"--dont-kill"
,
help
=
"Leave cluster running after test finishes"
,
action
=
'store_true'
)
parser
.
add_argument
(
"--only-bios"
,
help
=
"Limit testing to bios node."
,
action
=
'store_true'
)
parser
.
add_argument
(
"--dump-error-details"
,
help
=
"Upon error print etc/eosio/node_*/config.ini and var/lib/node_*/stderr.log to stdout"
,
action
=
'store_true'
)
...
...
@@ -22,6 +23,7 @@ args = parser.parse_args()
debug
=
args
.
v
dontKill
=
args
.
dont_kill
dumpErrorDetails
=
args
.
dump_error_details
onlyBios
=
args
.
only_bios
testUtils
.
Utils
.
Debug
=
debug
...
...
@@ -43,7 +45,7 @@ try:
Print
(
"producing nodes: %s, non-producing nodes: %d, topology: %s, delay between nodes launch(seconds): %d"
%
(
pnodes
,
total_nodes
-
pnodes
,
topo
,
delay
))
Print
(
"Stand up cluster"
)
if
cluster
.
launch
(
pnodes
,
total_nodes
,
prodCount
,
topo
,
delay
)
is
False
:
if
cluster
.
launch
(
pnodes
,
total_nodes
,
prodCount
,
topo
,
delay
,
onlyBios
=
onlyBios
,
dontKill
=
dontKill
)
is
False
:
errorExit
(
"Failed to stand up eos cluster."
)
Print
(
"Wait for Cluster stabilization"
)
...
...
@@ -55,15 +57,19 @@ try:
initaPrvtKey
=
producerKeys
[
"inita"
][
"private"
]
initbPrvtKey
=
producerKeys
[
"initb"
][
"private"
]
cmd
=
"%s --dont-launch --inita_prvt_key %s --initb_prvt_key %s %s %s
"
%
(
actualTest
,
initaPrvtKey
,
initbPrvtKey
,
"-v"
if
debug
else
""
,
"--dont-kill"
if
dontKill
else
""
)
cmd
=
"%s --dont-launch --inita_prvt_key %s --initb_prvt_key %s %s %s
%s"
%
(
actualTest
,
initaPrvtKey
,
initbPrvtKey
,
"-v"
if
debug
else
""
,
"--dont-kill"
if
dontKill
else
""
,
"--only-bios"
if
onlyBios
else
""
)
Print
(
"Starting up %s test: %s"
%
(
"nodeos"
,
actualTest
))
Print
(
"cmd: %s
\n
"
%
(
cmd
))
if
0
!=
subprocess
.
call
(
cmd
,
shell
=
True
):
errorExit
(
"failed to run cmd."
)
testSuccessful
=
True
Print
(
"
\n
END"
)
finally
:
if
testSuccessful
:
Print
(
"Test succeeded."
)
else
:
Print
(
"Test failed."
)
if
not
testSuccessful
and
dumpErrorDetails
:
cluster
.
dumpErrorDetails
()
Print
(
"== Errors see above =="
)
...
...
tests/testUtils.py
浏览文件 @
a9dd6053
...
...
@@ -1303,7 +1303,9 @@ class Cluster(object):
return
True
# Initialize the default nodes (at present just the root node)
def
initializeNodes
(
self
,
initaPrvtKey
=
None
,
initbPrvtKey
=
None
):
def
initializeNodes
(
self
,
initaPrvtKey
=
None
,
initbPrvtKey
=
None
,
onlyBios
=
False
):
port
=
Cluster
.
__BiosPort
if
onlyBios
else
self
.
port
host
=
Cluster
.
__BiosHost
if
onlyBios
else
self
.
host
node
=
Node
(
self
.
host
,
self
.
port
,
enableMongo
=
self
.
enableMongo
,
mongoHost
=
self
.
mongoHost
,
mongoPort
=
self
.
mongoPort
,
mongoDb
=
self
.
mongoDb
)
node
.
setWalletEndpointArgs
(
self
.
walletEndpointArgs
)
if
Utils
.
Debug
:
Utils
.
Print
(
"Node:"
,
node
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录