summaryrefslogtreecommitdiff
path: root/cesar/common/tests/Makefile
blob: 22954216072284dc6e237dcb71f2f9b12b797c7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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) < $<)