packaging/perftest.sh: Added force-parameter
This commit is contained in:
parent
68c0c74d37
commit
0af832075f
1 changed files with 7 additions and 4 deletions
|
@ -55,6 +55,7 @@ JOB=
|
||||||
BIN_SHA256=
|
BIN_SHA256=
|
||||||
CACHE_DIR=
|
CACHE_DIR=
|
||||||
DATA_DIR=
|
DATA_DIR=
|
||||||
|
FORCE="false"
|
||||||
|
|
||||||
while [ $# -gt 1 ]; do
|
while [ $# -gt 1 ]; do
|
||||||
OPT="$1"
|
OPT="$1"
|
||||||
|
@ -75,6 +76,9 @@ while [ $# -gt 1 ]; do
|
||||||
--data-dir=*)
|
--data-dir=*)
|
||||||
DATA_DIR="${OPT##*=}"
|
DATA_DIR="${OPT##*=}"
|
||||||
;;
|
;;
|
||||||
|
--force)
|
||||||
|
FORCE="true"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
warn "Ignoring unknown option: '${OPT}' (Note that this script reads DB)"
|
warn "Ignoring unknown option: '${OPT}' (Note that this script reads DB)"
|
||||||
;;
|
;;
|
||||||
|
@ -115,11 +119,10 @@ PERFJOB_DIR="$DATA_DIR/_perftest/$JOB"
|
||||||
PERFSCRIPT_DIR="$CONF_DIR/perftest/$JOB"
|
PERFSCRIPT_DIR="$CONF_DIR/perftest/$JOB"
|
||||||
PERFDATA_DIR="$PERFJOB_DIR/$BIN_SHA256"
|
PERFDATA_DIR="$PERFJOB_DIR/$BIN_SHA256"
|
||||||
|
|
||||||
if [ -d "$PERFDATA_DIR" ]; then
|
if [ -d "$PERFDATA_DIR" -o "$FORCE" = "true" ]; then
|
||||||
info "$PERFDATA_DIR already exists, exiting"
|
info "$PERFDATA_DIR already exists, exiting"
|
||||||
exit 0
|
exit 0
|
||||||
fi;
|
fi
|
||||||
#< goto maybe add a 'force' param to rerun test + regenerate plot
|
|
||||||
|
|
||||||
case "${JOB},${BIN_EXT}" in
|
case "${JOB},${BIN_EXT}" in
|
||||||
unipi,hvt)
|
unipi,hvt)
|
||||||
|
@ -131,7 +134,7 @@ case "${JOB},${BIN_EXT}" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
info done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue