Commit d936b52d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8c6e4b52
...@@ -1477,38 +1477,27 @@ Additional utility commands: ...@@ -1477,38 +1477,27 @@ Additional utility commands:
EOF EOF
} }
# commands and their flags:
#
# build: needs to rebuild NEO stuff
# net: needs init_net
# fs: needs init_fs
case "$1" in case "$1" in
# commands that require build info) f=( );;
test-local | \ info-local) f=( net );;
test-go | \ test) f=( );;
test-py | \ test-local) f=(build );;
bench-local | \ test-go) f=(build );;
bench-cluster | \ test-py) f=( );;
zbench-local | \ bench-local) f=(build net fs );;
zbench-cluster | \ bench-cluster) f=(build net fs );;
zbench-client | \ zbench-local) f=(build net fs );;
bench-cpu | \ zbench-cluster) f=(build net fs );;
bench-disk | \ zbench-client) f=(build );;
bench-net) bench-cpu) f=(build );;
;; bench-disk) f=( fs );;
bench-net) f=( net );;
info) cpustat) f=( );;
shift
cmd_info "$@"
exit 0
;;
info-local)
shift
cmd_info-local "$@"
exit 0
;;
cpustat)
shift
cmd_cpustat "$@"
exit 0
;;
-h) -h)
usage usage
...@@ -1520,20 +1509,35 @@ cpustat) ...@@ -1520,20 +1509,35 @@ cpustat)
;; ;;
esac esac
# make sure tzodb*, tcpu* and zgenprod are on PATH (because we could be invoked from another dir)
X=$(cd `dirname $0` && pwd)
export PATH=$X:$PATH
# rebuild go bits for flag in ${f[*]}; do
# neo/py, wendelin.core, ... - must be pip install'ed - `neotest deploy` cares about that case "$flag" in
go install -v lab.nexedi.com/kirr/neo/go/... build)
go build -o $X/tzodb_go $X/tzodb.go # make sure tzodb*, tcpu* and zgenprod are on PATH (because we could be invoked from another dir)
#go build -race -o $X/tzodb_go $X/tzodb.go X=$(cd `dirname $0` && pwd)
go build -o $X/tcpu_go $X/tcpu.go export PATH=$X:$PATH
# setup network & fs environment # rebuild go bits
init_net # neo/py, wendelin.core, ... - must be pip install'ed - `neotest deploy` cares about that
init_fs go install -v lab.nexedi.com/kirr/neo/go/...
go build -o $X/tzodb_go $X/tzodb.go
go build -o $X/tcpu_go $X/tcpu.go
;;
net)
# setup network environment
init_net
;;
fs)
# setup fs environment
init_fs
;;
*)
die "internal-error: command $1: invalid flag: $flag"
esac
done
# run the command # run the command
cmd="$1" cmd="$1"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment