]> rtime.felk.cvut.cz Git - can-benchmark.git/commitdiff
Allow rerunning only the necessary experiments
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 23 Sep 2011 22:24:06 +0000 (00:24 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Sat, 24 Sep 2011 12:46:27 +0000 (14:46 +0200)
i.e. those that were not run yet or that changed

gw-tests/Makefile
gw-tests/lib.sh

index 520bc6c3962e9880087b2b8ffd5ca755594893c7..580d3ad93baf6aa9ae371b0e04d1ae5ebe637458 100644 (file)
@@ -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)
index 8cfcf265094c0f493d7dc78ab8782b33a34edadd..75fb899c4c0d34910d59ef0157a63ceb98639a83 100644 (file)
@@ -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