From 0af832075fd22d8d89d0c5ed8812490c84ce56af Mon Sep 17 00:00:00 2001 From: rand00 Date: Tue, 17 Jan 2023 11:17:55 +0100 Subject: [PATCH] packaging/perftest.sh: Added force-parameter --- packaging/perftest.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packaging/perftest.sh b/packaging/perftest.sh index 745c484..2972e59 100755 --- a/packaging/perftest.sh +++ b/packaging/perftest.sh @@ -55,6 +55,7 @@ JOB= BIN_SHA256= CACHE_DIR= DATA_DIR= +FORCE="false" while [ $# -gt 1 ]; do OPT="$1" @@ -75,6 +76,9 @@ while [ $# -gt 1 ]; do --data-dir=*) DATA_DIR="${OPT##*=}" ;; + --force) + FORCE="true" + ;; *) 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" 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" exit 0 -fi; -#< goto maybe add a 'force' param to rerun test + regenerate plot +fi case "${JOB},${BIN_EXT}" in unipi,hvt) @@ -131,7 +134,7 @@ case "${JOB},${BIN_EXT}" in ;; esac - +info done