Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
261a04d2
Commit
261a04d2
authored
Sep 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cc24dad4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
16 deletions
+53
-16
go/neo/t/neotest
go/neo/t/neotest
+53
-16
No files found.
go/neo/t/neotest
View file @
261a04d2
...
...
@@ -3,20 +3,21 @@
# ---- deploy NEO for tests/benchmarks at a node ----
# deploy [user@]<host>:<path> - deploy NEO & needed software for tests there
#
cmd_
deploy [user@]<host>:<path> - deploy NEO & needed software for tests there
# ssh-key or password for access should be available
deploy
()
{
cmd_
deploy
()
{
host
=
`
echo
$1
|sed
-e
's/:[^:]*$//'
`
# user@host
path
=
${
1
:
$((${#
host
}
+
1
))}
# path
test
-z
"
$host
"
-o
-z
"
$path
"
&&
echo
1>&2
"
invalid URL
"
&&
exit
1
test
-z
"
$host
"
-o
-z
"
$path
"
&&
echo
1>&2
"
Usage: neotest deploy [user@]<host>:<path>
"
&&
exit
1
echo
-e
"
\n
*** deploying to
$@
..."
scp
$0
$host
:neotest
ssh
$host
./neotest deploy-local
"
$path
"
}
# deploy_local <path> - deploy NEO & needed software for tests @path
deploy_local
()
{
#
cmd_
deploy_local <path> - deploy NEO & needed software for tests @path
cmd_
deploy_local
()
{
path
=
$1
test-z
"
$path
"
&&
echo
1>&2
"Usage: neotest deploy-local
test -e
$path
/deployed && echo "
# already deployed" && return
mkdir
-p
$path
cd
$path
...
...
@@ -62,13 +63,13 @@ EOF
case
"
$1
"
in
deploy
)
shift
deploy
"
$@
"
cmd_
deploy
"
$@
"
exit
;;
deploy-local
)
shift
deploy_local
"
$@
"
cmd_
deploy_local
"
$@
"
exit
;;
esac
...
...
@@ -114,7 +115,8 @@ xmysql() {
}
# if we are abnormally terminating
trap
'set +e
install_trap
()
{
trap
'set +e
echo "E: abnormal termination - stopping..."
xneoctl set cluster stopping
sleep 1
...
...
@@ -125,6 +127,7 @@ test -z "$j" && exit
echo "E: killing left jobs..."
jobs -l
kill $j'
EXIT
}
# ---- start NEO nodes ----
...
...
@@ -409,8 +412,13 @@ bench_go() {
}
# benchmark when client and storage are on the same computer
bench_local
()
{
# command: benchmark when client and storage are on the same computer
cmd_bench_local
()
{
install_trap
header
gen_data
echo
-e
"
\n
*** FileStorage"
bench
$fs1
/data.fs
...
...
@@ -444,13 +452,42 @@ bench_local() {
X_NEOGO_SHA1_SKIP
=
y bench_go neo://
$cluster
@
$Mbind
xneoctl
set
cluster stopping
wait
# all ok
trap
- EXIT
exit
}
# ---- main driver ----
header
gen_data
bench_local
# all ok
trap
- EXIT
exit
usage
()
{
cat
1>&2
<<
'
EOF
'
Neotest is a tool to functionally test and benchmark NEO.
Usage:
neotest command [arguments]
The commands are:
bench-local run benchmarks when client and server are on the same host
deploy deploy NEO & needed software for tests to remote host
deploy-local deploy NEO & needed software for tests locally
EOF
}
case
"
$1
"
in
bench-local
)
cmd_bench_local
;;
-h
)
usage
exit
0
;;
*
)
usage
exit
1
;;
esac
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