summaryrefslogtreecommitdiff
path: root/cesar/common/tests/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/common/tests/Makefile')
-rw-r--r--cesar/common/tests/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/cesar/common/tests/Makefile b/cesar/common/tests/Makefile
new file mode 100644
index 0000000000..2295421607
--- /dev/null
+++ b/cesar/common/tests/Makefile
@@ -0,0 +1,31 @@
+BASE = ../..
+RUN_TEST = run-test.pl
+GET_COV = get-cov.pl
+COVERAGE_OUTPUT = coverage
+COVERAGE_TITLE = Cesar
+
+all: tests.all.brief tests.all.result
+
+.PHONY: tests.all
+
+tests.all: tests $(RUN_TEST)
+ -perl $(RUN_TEST) $(BASE) < $< > $@ 2>&1
+
+clean: tests.clean
+ rm -f tests.all.brief tests.all tests.clean
+
+.PHONY: tests.clean
+
+tests.clean: tests $(RUN_TEST)
+ perl $(RUN_TEST) -I clean $(BASE) < $< > $@ 2>&1
+
+%.brief: %
+ grep '^==' < $< > $@
+
+%.result: %.brief
+ grep '^===' < $<
+
+.PHONY: cov
+
+cov: tests $(GET_COV)
+ genhtml -q -t $(COVERAGE_TITLE) -o $(COVERAGE_OUTPUT) -s $$(perl $(GET_COV) $(BASE) < $<)