From 21d25d64f7e7f048b2d2a0313ef9ab83cdca942b Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Sat, 24 Sep 2011 00:24:06 +0200 Subject: [PATCH] Allow rerunning only the necessary experiments i.e. those that were not run yet or that changed --- gw-tests/Makefile | 2 +- gw-tests/lib.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gw-tests/Makefile b/gw-tests/Makefile index 520bc6c..580d3ad 100644 --- a/gw-tests/Makefile +++ b/gw-tests/Makefile @@ -8,7 +8,7 @@ T:=$(filter-out filter%,$(T)) $(filter filter%,$(T)) all: $(T:%=run-%) html @echo "Run 'make plot' to generate graphs" -TEST_FLAGS = -P -t all -l all +TEST_FLAGS = -P -t all -l all $(if $(UPDATE),-u) $(T:%=run-%):run-%: ./$* $(TEST_FLAGS) diff --git a/gw-tests/lib.sh b/gw-tests/lib.sh index 8cfcf26..75fb899 100644 --- a/gw-tests/lib.sh +++ b/gw-tests/lib.sh @@ -25,6 +25,7 @@ while [ $# -gt 0 ]; do *) error "Unknown load specification: $2";; esac; shift 2;; + -u) OPT_UPDATE=1; shift;; esac done @@ -112,6 +113,7 @@ kill_load() { } _measure() { + if [[ "$OPT_UPDATE" && -f plot.sh && ( plot.sh -nt $test.sh ) ]]; then echo "skiping: up-to-date"; return; fi # Remove data from the last measurement rm -rf * # Kill load generators left possibly from the past runs -- 2.39.2