]> rtime.felk.cvut.cz Git - can-benchmark.git/blobdiff - gw-tests/Makefile
Test for -rt kernel in highptio test
[can-benchmark.git] / gw-tests / Makefile
index 2f1cf862cb9e92d54275999a92ed037eca2927b2..c042d2faeaaef81287d3edae108fe7c57aab87f1 100644 (file)
@@ -1,18 +1,34 @@
 T=$(filter-out lib.sh,$(wildcard *.sh))
 
-.PHONY: $(T)
+.PHONY: $(T:%=run-%)
 
-all: $(T) html
+all: $(T:%=run-%) html
        @echo "Run 'make plot' to generate graphs"
 
 TEST_FLAGS = -P -t all
 
-$(T):%:
-       ./$@ $(TEST_FLAGS)
+$(T:%=run-%):run-%:
+       ./$* $(TEST_FLAGS)
 
-.PHONY: plot
-plot:
-       $(MAKE) TEST_FLAGS="-p -X"
+.PHONY: plot plotall
+
+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: