]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - gw-tests/Makefile
Allow multiple graphs per test
[can-benchmark.git] / gw-tests / Makefile
1 T:=$(filter-out lib.sh,$(wildcard *.sh))
2
3 # Run slow test at the end
4 T:=$(filter-out filter%,$(T)) $(filter filter%,$(T))
5
6 .PHONY: $(T:%=run-%)
7
8 all: $(T:%=run-%) html
9         @echo "Run 'make plot' to generate graphs"
10
11 TEST_FLAGS = -P -t all -l all
12
13 $(T:%=run-%):run-%:
14         ./$* $(TEST_FLAGS)
15
16 .PHONY: plot plotall
17
18 PLOT_SCRIPTS=$(shell find results -name plot.sh)
19
20 define plot_template
21 plot: $1/graph.png
22 $1/graph.png: $1/plot.sh $(notdir $1).sh lib.sh $(wildcard $1/*.txt)
23         $1/plot.sh -X
24 endef
25
26 define plotall_template
27 plotall: plot-$1
28 .PHONY: plot-$1
29 plot-$1:
30         $1/plot.sh -X
31 endef
32
33 $(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plot_template,$(result_dir))))
34 $(foreach result_dir,$(PLOT_SCRIPTS:%/plot.sh=%),$(eval $(call plotall_template,$(result_dir))))
35
36 .PHONY: html
37 html:
38         ./genhtml/genhtml.py results