Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
8b440498
Commit
8b440498
authored
Sep 18, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
41107a68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
go/neo/t/neotest
go/neo/t/neotest
+54
-1
No files found.
go/neo/t/neo
bench
→
go/neo/t/neo
test
View file @
8b440498
#!/bin/bash -e
# neobench: run tests and benchmarks against FileStorage, ZEO and various NEO/py{sql,sqlite}, NEO/go clusters
# neotest: run tests and benchmarks against FileStorage, ZEO and various NEO/py{sql,sqlite}, NEO/go clusters
# ---- deploy NEO for tests/benchmarks at a node ----
# deploy [user@]<host>:<path> - deploy NEO & needed software for tests there
# ssh-key or password for access should be available
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
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
()
{
path
=
$1
test
-e
$path
/deployed
&&
echo
"# already deployed"
&&
return
mkdir
-p
$path
# python part
virtualenv
$path
/venv
cat
>
$path
/env.sh
<<
'
EOF
'
X=
${
1
:-${
BASH_SOURCE
[0]
}}
# path to original env.sh is explicitly passed
X=
$(
cd
`
dirname
$X
`
&&
pwd
)
# when there is other env.sh wrapping us
export GOPATH=
$X
:
$GOPATH
export PATH=
$X
/bin:
$PATH
export PS1="(`basename
$X
`)
$PS1
"
# strip trailing : from
$GOPATH
GOPATH=
${
GOPATH
%
:
}
.
$X
/venv/bin/activate
EOF
}
# jump to deploy early if we have to
case
"
$1
"
in
deploy
)
shift
deploy
"
$@
"
exit
;;
deploy-local
)
shift
deploy_local
"
$@
"
exit
;;
esac
# ----------------------------------------
# XXX neo/go - must be `go install'ed`
# XXX use `go run ...` so it does not need go install?
...
...
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