Allow ranning experiments for all kernels
[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 $(if $(UPDATE),-u)
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
39
40 KERNELS=2.6.33.7-00007-g9c0ff90 2.6.33.7-rt29-00004-g92487e4 2.6.36.2-00015-g4f1bc4e 3.0.4-00007-g1c8c373 3.0.4-rt14-00008-gb2052fd
41
42 .PHONY: allkern $(KERNELS:%=kernel-%)
43 allkern: $(KERNELS:%=kernel-%)
44
45 $(KERNELS:%=kernel-%): kernel-%: 
46         ln -sf uImage-$* /srv/tftp/ryu/uImage
47         dtrrts /dev/ttyUSB0 1 1
48         sleep 30
49         $(MAKE)