Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
336b0ecd
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,发现更多精彩内容 >>
提交
336b0ecd
编写于
1月 12, 2018
作者:
C
Ciju John
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add eosd_run_test.py test to automated builds. Add json support to more methods.
上级
6e1de5e6
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
132 addition
and
167 deletion
+132
-167
.travis.yml
.travis.yml
+1
-0
tests/distributed-transactions-test.py
tests/distributed-transactions-test.py
+0
-1
tests/eosd_run_test.py
tests/eosd_run_test.py
+6
-9
tests/testUtils.py
tests/testUtils.py
+125
-157
未找到文件。
.travis.yml
浏览文件 @
336b0ecd
...
...
@@ -78,6 +78,7 @@ script:
-
${CMAKE_DIR}cmake -G Ninja -DWASM_LLVM_CONFIG=$TRAVIS_BUILD_DIR/ext/wasm-compiler/bin/llvm-config -DSecp256k1_ROOT_DIR=$TRAVIS_BUILD_DIR/ext -DBINARYEN_ROOT=$TRAVIS_BUILD_DIR/ext/wasm-compiler -DCMAKE_PREFIX_PATH=$TRAVIS_BUILD_DIR/ext -DCMAKE_BUILD_TYPE=Release $EOS_CMAKE_OPTIONS ..
-
ninja -j4
-
tests/eosd_run_test.sh --host=localhost --port=8888
-
'
[
"$TRAVIS_OS_NAME"
==
"osx"
]
||
tests/eosd_run_test.py
--host=localhost
--port=8888'
-
'
[
"$TRAVIS_OS_NAME"
==
"osx"
]
||
EOSLIB=../contracts
tests/chain_test'
-
'
[
"$TRAVIS_OS_NAME"
==
"osx"
]
||
tests/slow_test'
-
'
[
"$TRAVIS_OS_NAME"
==
"osx"
]
||
tests/api_test'
...
...
tests/distributed-transactions-test.py
浏览文件 @
336b0ecd
...
...
@@ -59,7 +59,6 @@ try:
errorExit
(
"Wallet initialization failed."
)
Print
(
"Create accounts."
)
#if not cluster.createAccounts(wallet):
if
not
cluster
.
createAccounts
(
testUtils
.
Cluster
.
initaAccount
):
errorExit
(
"Accounts creation failed."
)
...
...
tests/eosd_run_test.py
浏览文件 @
336b0ecd
...
...
@@ -8,6 +8,8 @@ import re
###############################################################
# eosd_run_test
# --dumpErrorDetails <Upon error print tn_data_*/config.ini and tn_data_*/stderr.log to stdout>
# --keepLogs <Don't delete tn_data_* folders upon test completion>
###############################################################
Print
=
testUtils
.
Utils
.
Print
...
...
@@ -26,9 +28,6 @@ def cmdError(name, code=0, exitNow=False):
TEST_OUTPUT_DEFAULT
=
"test_output_0.txt"
LOCAL_HOST
=
"localhost"
DEFAULT_PORT
=
8888
# INITA_PRV_KEY="5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
# INITB_PRV_KEY="5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"
#LOG_FILE="eeosd_run_test.log"
parser
=
argparse
.
ArgumentParser
(
add_help
=
False
)
# Override default help argument so that only --help (and not -h) can call help
...
...
@@ -36,7 +35,7 @@ parser.add_argument('-?', action='help', default=argparse.SUPPRESS,
help
=
argparse
.
_
(
'show this help message and exit'
))
parser
.
add_argument
(
"-o"
,
"--output"
,
type
=
str
,
help
=
"output file"
,
default
=
TEST_OUTPUT_DEFAULT
)
parser
.
add_argument
(
"-h"
,
"--host"
,
type
=
str
,
help
=
"eosd host name"
,
default
=
LOCAL_HOST
)
parser
.
add_argument
(
"-p"
,
"--port"
,
type
=
str
,
help
=
"eosd host port"
,
default
=
DEFAULT_PORT
)
parser
.
add_argument
(
"-p"
,
"--port"
,
type
=
int
,
help
=
"eosd host port"
,
default
=
DEFAULT_PORT
)
parser
.
add_argument
(
"--dumpErrorDetails"
,
help
=
"Upon error print tn_data_*/config.ini and tn_data_*/stderr.log to stdout"
,
action
=
'store_true'
)
...
...
@@ -49,8 +48,6 @@ testOutputFile=args.output
server
=
args
.
host
port
=
args
.
port
debug
=
args
.
v
#ciju
#debug=True
localTest
=
True
if
server
==
LOCAL_HOST
else
False
testUtils
.
Utils
.
Debug
=
debug
...
...
@@ -299,7 +296,7 @@ try:
expectedServants
=
[
testeraAccount
.
name
,
currencyAccount
.
name
]
Print
(
"Get %s servants, Expected: %s"
%
(
initaAccount
.
name
,
expectedServants
))
actualServants
=
node
.
getServants
(
initaAccount
.
name
)
actualServants
=
node
.
getServants
Arr
(
initaAccount
.
name
)
if
actualServants
is
None
:
cmdError
(
"eosc get servants testera"
)
errorExit
(
"Failed to retrieve %s servants"
%
(
initaAccount
.
name
))
...
...
@@ -309,7 +306,7 @@ try:
initaAccount
.
name
,
expectedServants
,
actualServants
),
raw
=
True
)
Print
(
"Get %s servants, Expected: []"
%
(
testeraAccount
.
name
))
actualServants
=
node
.
getServants
(
testeraAccount
.
name
)
actualServants
=
node
.
getServants
Arr
(
testeraAccount
.
name
)
if
actualServants
is
None
:
cmdError
(
"eosc get servants testera"
)
errorExit
(
"Failed to retrieve %s servants"
%
(
testeraAccount
.
name
))
...
...
@@ -332,7 +329,7 @@ try:
errorExit
(
"FAILURE - get transaction trans_id failed: %s"
%
(
transId
),
raw
=
True
)
Print
(
"Get transactions for account %s"
%
(
testeraAccount
.
name
))
actualTransactions
=
node
.
getTransactionsByAccount
(
testeraAccount
.
name
)
actualTransactions
=
node
.
getTransactions
Arr
ByAccount
(
testeraAccount
.
name
)
if
actualTransactions
is
None
:
cmdError
(
"eosc get transactions testera"
)
errorExit
(
"Failed to get transactions by account %s"
%
(
testeraAccount
.
name
))
...
...
tests/testUtils.py
浏览文件 @
336b0ecd
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录