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
c1fe3337
Commit
c1fe3337
authored
Nov 15, 2018
by
jiangpeng
Committed by
vipwzw
Nov 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add autotest build
parent
960e0451
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
12 deletions
+47
-12
.gitignore
.gitignore
+2
-4
Makefile
Makefile
+10
-8
build.sh
build/autotest/build.sh
+35
-0
No files found.
.gitignore
View file @
c1fe3337
...
...
@@ -21,10 +21,8 @@ build/main.sh
build/main*
build/para.sh
build/ci
build/tools/autotest/autotest
build/tools/autotest/*.toml
build/tools/autotest/chain33
build/tools/autotest/chain33-cli
build/autotest/*
!build/autotest/build.sh
.DS_Store
logs/
build/wallet
...
...
Makefile
View file @
c1fe3337
...
...
@@ -10,8 +10,6 @@ SRC_CLI := github.com/33cn/plugin/cli
APP
:=
build/chain33
CHAIN33
=
github.com/33cn/chain33
CHAIN33_PATH
=
vendor/
${
CHAIN33
}
AUTOTEST
:=
build/autotest/autotest
SRC_AUTOTEST_PLUGIN
:=
${
CHAIN33_PATH
}
/cmd/autotest/pluginversion
LDFLAGS
:=
-ldflags
"-w -s"
PKG_LIST
:=
`
go list ./... |
grep
-v
"vendor"
|
grep
-v
"chain33/test"
|
grep
-v
"mocks"
|
grep
-v
"pbft"
`
PKG_LIST_Q
:=
`
go list ./... |
grep
-v
"vendor"
|
grep
-v
"chain33/test"
|
grep
-v
"mocks"
|
grep
-v
"blockchain"
|
grep
-v
"pbft"
`
...
...
@@ -39,12 +37,16 @@ para:
autotest
:
##
build autotest binary
@
cp
-r
$(CHAIN33_PATH)
/build/autotest build/
@
go build
-v
-i
-o
$(AUTOTEST)
$(SRC_AUTOTEST_PLUGIN)
@
cp
cmd/autotest/
*
.toml build/tools/autotest/
@
cd
build/autotest
&&
bash ./build.sh
&&
cd
../../
@
if
[
-n
"
$(dapp)
"
]
;
then
\
cd
build/tools/autotest
&&
bash ./local-autotest.sh
$(dapp)
&&
cd
../../../
;
\
fi
rm
-rf
build/autotest/local
\
&&
cp
-r
$(CHAIN33_PATH)
/build/autotest/local
$(CHAIN33_PATH)
/build/autotest/
*
.sh build/autotest/
\
&&
cd
build/autotest
&&
bash ./copy-autotest.sh
local
&&
cd local
&&
bash ./local-autotest.sh
$(dapp)
&&
cd
../../../
;
fi
autotest_ci
:
autotest
##
autotest ci
@
rm
-rf
build/autotest/jerkinsci
\
&&
cp
-r
$(CHAIN33_PATH)
/build/autotest/jerkinsci
$(CHAIN33_PATH)
/build/autotest/
*
.sh build/autotest/
\
&&
cd
build/autotest
&&
bash ./copy-autotest.sh jerkinsci/temp
$(proj)
\
&&
cd
jerkinsci
&&
bash ./jerkins-ci-autotest.sh
$(proj)
&&
cd
../../../
update
:
rm
-rf
${
CHAIN33_PATH
}
...
...
@@ -143,7 +145,7 @@ clean: ## Remove previous build
@
rm
-rf
build/relayd
*
@
rm
-rf
build/
*
.log
@
rm
-rf
build/logs
@
rm
-rf
build/
tools/
autotest/autotest
@
rm
-rf
build/autotest/autotest
@
rm
-rf
build/ci
@
rm
-rf
tool
@
go clean
...
...
build/autotest/build.sh
0 → 100755
View file @
c1fe3337
#!/usr/bin/env bash
set
-e
set
-o
pipefail
#set -o verbose
#set -o xtrace
sedfix
=
""
if
[
"
$(
uname
)
"
==
"Darwin"
]
;
then
sedfix
=
".bak"
fi
AutoTestMain
=
"../../vendor/github.com/33cn/chain33/cmd/autotest/main.go"
ImportPlugin
=
'"github.com/33cn/plugin/plugin"'
function
build_auto_test
()
{
rm
-rf
*
.go
cp
"
${
AutoTestMain
}
"
./
sed
-i
$sedfix
'/^package/a import _ '
${
ImportPlugin
}
''
*
.go
go build
-v
-i
-o
autotest
}
function
clean_auto_test
()
{
rm
-rf
*
.go
}
trap
"clean_auto_test"
INT TERM EXIT
build_auto_test
\ No newline at end of file
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