X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/blobdiff_plain/25a87df81e3eb9b6e0bff19a2197165b3c3ceb2a..0067509575642daf871e95388be79ae95ad33d70:/gw-tests/Makefile diff --git a/gw-tests/Makefile b/gw-tests/Makefile index 2ede079..c0bb27f 100644 --- a/gw-tests/Makefile +++ b/gw-tests/Makefile @@ -1,27 +1,37 @@ -T=$(filter-out lib.sh,$(wildcard *.sh)) +T:=$(filter-out lib.sh,$(wildcard *.sh)) -.PHONY: $(T) +# Run slow test at the end +T:=$(filter-out filter%,$(T)) $(filter filter%,$(T)) -all: $(T) html +.PHONY: $(T:%=run-%) + +all: $(T:%=run-%) html @echo "Run 'make plot' to generate graphs" -TEST_FLAGS = -P -t all +TEST_FLAGS = -P -t all -l all -$(T):%: - ./$@ $(TEST_FLAGS) +$(T:%=run-%):run-%: + ./$* $(TEST_FLAGS) .PHONY: plot plotall -PLOT_SCRIPTS=$(shell find results -name plot.sh) -THUMBS=$(PLOT_SCRIPTS:%/plot.sh=%/thumb) -plot: $(THUMBS) -%/thumb: %/plot.sh - $*/plot.sh -X - -plotall: $(PLOT_SCRIPTS:%=run-%) -run-%: % - $* -X +PLOT_SCRIPTS=$(shell find results -name plot.sh) +define plot_template +plot: $1/thumb +$1/thumb: $1/plot.sh $(notdir $1).sh $(wildcard $1/*.txt) + $1/plot.sh -X +endef + +define plotall_template +plotall: plot-$1 +.PHONY: plot-$1 +plot-$1: + $1/plot.sh -X +endef + +$(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plot_template,$(result_dir)))) +$(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plotall_template,$(result_dir)))) .PHONY: html html: