Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
3b66a970
Commit
3b66a970
authored
Jan 14, 2019
by
mdj33
Committed by
33cn
Jan 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve paracross ci case
parent
af2a611a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
33 deletions
+47
-33
.gitlab-ci.yml
.gitlab-ci.yml
+13
-13
.travis.yml
.travis.yml
+1
-1
Makefile
Makefile
+4
-5
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+29
-14
No files found.
.gitlab-ci.yml
View file @
3b66a970
...
...
@@ -46,7 +46,7 @@ go_test:
tags
:
-
33cn
script
:
-
make docker-compose-down
DAPP
=all
-
make docker-compose-down
dapp
=all
-
make test
only
:
-
master
...
...
@@ -90,8 +90,8 @@ deploy_relay:
-
33cn
script
:
-
make build_ci
-
make docker-compose
PROJ=relay DAPP
=relay
-
make docker-compose-down
PROJ=relay DAPP
=relay
-
make docker-compose
proj=relay dapp
=relay
-
make docker-compose-down
proj=relay dapp
=relay
only
:
-
master
...
...
@@ -101,8 +101,8 @@ deploy_paracross:
-
33cn
script
:
-
make build_ci
-
make docker-compose
PROJ=paracross DAPP
=paracross
-
make docker-compose-down
PROJ=paracross DAPP
=paracross
-
make docker-compose
proj=paracross dapp
=paracross
-
make docker-compose-down
proj=paracross dapp
=paracross
only
:
-
master
...
...
@@ -139,8 +139,8 @@ fork_test_privacy:
script
:
-
if [ -n "${onceEveryday}" ]; then
-
make build_ci
-
make fork-test
PROJ=privacy DAPP
=privacy
-
make docker-compose-down
PROJ=privacy DAPP
=privacy
-
make fork-test
proj=privacy dapp
=privacy
-
make docker-compose-down
proj=privacy dapp
=privacy
-
fi
only
:
-
master
...
...
@@ -153,8 +153,8 @@ fork_test_paracross:
script
:
-
if [ -n "${onceEveryday}" ]; then
-
make build_ci
-
make fork-test
PROJ=paracross DAPP
=paracross
-
make docker-compose-down
PROJ=paracross DAPP
=paracross
-
make fork-test
proj=paracross dapp
=paracross
-
make docker-compose-down
proj=paracross dapp
=paracross
-
fi
only
:
-
master
...
...
@@ -168,8 +168,8 @@ fork_test_all:
script
:
-
if [ -n "${onceEveryday}" ]; then
-
make build_ci
-
make fork-test
PROJ=fork DAPP
=all
-
make docker-compose-down
PROJ=fork DAPP
=all
-
make fork-test
proj=fork dapp
=all
-
make docker-compose-down
proj=fork dapp
=all
-
fi
only
:
-
master
...
...
@@ -183,8 +183,8 @@ deploy_test_all:
script
:
-
if [ -n "${onceEveryday}" ]; then
-
make build_ci
-
make docker-compose
PROJ=deploy DAPP
=all
-
make docker-compose-down
PROJ=deploy DAPP
=all
-
make docker-compose
proj=deploy dapp
=all
-
make docker-compose-down
proj=deploy dapp
=all
-
fi
only
:
-
master
...
...
.travis.yml
View file @
3b66a970
...
...
@@ -62,4 +62,4 @@ matrix:
-
sudo mv docker-compose /usr/local/bin
before_script
:
make build_ci
script
:
-
make docker-compose
DAPP=${DAPP} && make docker-compose-down DAPP
=${DAPP} && make clean
-
make docker-compose
dapp=${DAPP} && make docker-compose-down dapp
=${DAPP} && make clean
Makefile
View file @
3b66a970
...
...
@@ -17,8 +17,7 @@ PKG_LIST_INEFFASSIGN= `go list -f {{.Dir}} ./... | grep -v "vendor"`
BUILD_FLAGS
=
-ldflags
"-X github.com/33cn/chain33/common/version.GitCommit=
`
git rev-parse
--short
=
8 HEAD
`
"
MKPATH
=
$
(
abspath
$
(
lastword
$(MAKEFILE_LIST)
))
MKDIR
=
$
(
dir
$(MKPATH)
)
DAPP
:=
""
PROJ
:=
"build"
proj
:=
"build"
.PHONY
:
default dep all build release cli linter race test fmt vet bench msan coverage coverhtml docker docker-compose protobuf clean help autotest
default
:
build depends
...
...
@@ -123,16 +122,16 @@ docker-compose: ## build docker-compose for chain33 run
@
cd
build
&&
if
!
[
-d
ci
]
;
then
\
make
-C
../
;
\
fi
;
\
cp
chain33
*
Dockerfile docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh run
$(
PROJ)
$(DAPP
)
&&
cd
../..
cp
chain33
*
Dockerfile docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh run
$(
proj)
$(dapp
)
&&
cd
../..
docker-compose-down
:
##
build docker-compose for chain33 run
@
cd
build
&&
if
[
-d
ci
]
;
then
\
cp
chain33
*
Dockerfile docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh down
$(
PROJ)
$(DAPP
)
&&
cd
..
;
\
cp
chain33
*
Dockerfile docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh down
$(
proj)
$(dapp
)
&&
cd
..
;
\
fi
;
\
cd
..
fork-test
:
##
build fork-test for chain33 run
@
cd
build
&&
cp
chain33
*
Dockerfile system-fork-test.sh docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh forktest
$(
PROJ)
$(DAPP
)
&&
cd
../..
@
cd
build
&&
cp
chain33
*
Dockerfile system-fork-test.sh docker-compose
*
ci/
&&
cd
ci/
&&
./docker-compose-pre.sh forktest
$(
proj)
$(dapp
)
&&
cd
../..
clean
:
##
Remove previous build
...
...
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
3b66a970
...
...
@@ -96,8 +96,7 @@ function para_transfer() {
txhash
=
$(
para_configkey
"
${
PARA_CLI
}
"
"token-blacklist"
"BTY"
)
echo
"txhash=
$txhash
"
block_wait
"
${
PARA_CLI
}
"
1
$PARA_CLI
tx query
-s
"
${
txhash
}
"
query_tx
"
${
PARA_CLI
}
"
"
${
txhash
}
"
}
...
...
@@ -114,14 +113,34 @@ function para_configkey() {
echo
"
${
send
}
"
}
function
query_tx
()
{
block_wait
"
${
1
}
"
3
local times
=
100
while
true
;
do
ret
=
$(${
1
}
tx query
-s
"
${
2
}
"
| jq
-r
".tx.hash"
)
echo
"query hash is
${
2
}
, return
${
ret
}
"
if
[
"
${
ret
}
"
!=
"
${
2
}
"
]
;
then
block_wait
"
${
1
}
"
2
times
=
$((
times
-
1
))
if
[
$times
-le
0
]
;
then
echo
"query tx=
$2
failed"
exit
1
fi
else
echo
"query tx=
$2
success"
break
fi
done
}
function
token_create
()
{
echo
"=========== # para token test ============="
echo
"=========== # 1.token precreate ============="
hash
=
$(${
1
}
send token precreate
-f
0.001
-i
test
-n
guodunjifen
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-p
0
-s
GD
-t
10000
-k
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
)
echo
"
${
hash
}
"
block_wait
"
${
1
}
"
3
query_tx
"
${
1
}
"
"
${
hash
}
"
${
1
}
tx query
-s
"
${
hash
}
"
${
1
}
token get_precreated
owner
=
$(${
1
}
token get_precreated | jq
-r
".owner"
)
if
[
"
${
owner
}
"
!=
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
]
;
then
...
...
@@ -137,9 +156,8 @@ function token_create() {
echo
"=========== # 2.token finish ============="
hash
=
$(${
1
}
send token finish
-f
0.001
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-s
GD
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
echo
"
${
hash
}
"
block_wait
"
${
1
}
"
3
query_tx
"
${
1
}
"
"
${
hash
}
"
${
1
}
tx query
-s
"
${
hash
}
"
${
1
}
token get_finish_created
owner
=
$(${
1
}
token get_finish_created | jq
-r
".owner"
)
if
[
"
${
owner
}
"
!=
"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
]
;
then
...
...
@@ -163,9 +181,8 @@ function token_transfer() {
echo
"=========== # 2.token transfer ============="
hash
=
$(${
1
}
send token transfer
-a
11
-s
GD
-t
1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw
-k
0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b
)
echo
"
${
hash
}
"
block_wait
"
${
1
}
"
3
query_tx
"
${
1
}
"
"
${
hash
}
"
${
1
}
tx query
-s
"
${
hash
}
"
${
1
}
token token_balance
-a
1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw
-e
token
-s
GD
balance
=
$(${
1
}
token token_balance
-a
1GGF8toZd96wCnfJngTwXZnWCBdWHYYvjw
-e
token
-s
GD | jq
-r
'.[]|.balance'
)
if
[
"
${
balance
}
"
!=
"11.0000"
]
;
then
...
...
@@ -176,11 +193,10 @@ function token_transfer() {
echo
"=========== # 3.token send exec ============="
hash
=
$(${
1
}
send token send_exec
-a
11
-s
GD
-e
paracross
-k
0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b
)
echo
"
${
hash
}
"
block_wait
"
${
1
}
"
3
query_tx
"
${
1
}
"
"
${
hash
}
"
# $ ./build/chain33-cli exec addr -e user.p.para.paracross
# 19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
${
1
}
tx query
-s
"
${
hash
}
"
${
1
}
token token_balance
-a
19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
-e
token
-s
GD
balance
=
$(${
1
}
token token_balance
-a
19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
-e
token
-s
GD | jq
-r
'.[]|.balance'
)
if
[
"
${
balance
}
"
!=
"11.0000"
]
;
then
...
...
@@ -191,9 +207,8 @@ function token_transfer() {
echo
"=========== # 4.token withdraw ============="
hash
=
$(${
1
}
send token withdraw
-a
11
-s
GD
-e
paracross
-k
0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b
)
echo
"
${
hash
}
"
block_wait
"
${
1
}
"
3
query_tx
"
${
1
}
"
"
${
hash
}
"
${
1
}
tx query
-s
"
${
hash
}
"
${
1
}
token token_balance
-a
19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
-e
token
-s
GD
balance
=
$(${
1
}
token token_balance
-a
19WJJv96nKAU4sHFWqGmsqfjxd37jazqii
-e
token
-s
GD | jq
-r
'.[]|.balance'
)
if
[
"
${
balance
}
"
!=
"0.0000"
]
;
then
...
...
@@ -213,10 +228,10 @@ function para_cross_transfer_withdraw() {
sleep
15
${
CLI
}
send para asset_withdraw
--title
user.p.para.
-a
0.7
-n
test
-t
12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
times
=
100
local
times
=
100
while
true
;
do
acc
=
$(${
CLI
}
account balance
-e
paracross
-a
12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv | jq
-r
".balance"
)
echo
"account balance is
${
acc
}
, ex
cep
t 9.3 "
echo
"account balance is
${
acc
}
, ex
pec
t 9.3 "
if
[
"
${
acc
}
"
!=
"9.3000"
]
;
then
block_wait
"
${
CLI
}
"
2
times
=
$((
times
-
1
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment