forked from kframework/c-semantics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
95 lines (67 loc) · 3.47 KB
/
Makefile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
PARSER ?= ../dist/cparser
GOOD_DIRECTORIES = buildTests
SHOULDFAIL_DIRECTORIES = shouldFail unspecified-shouldFail
MUSTFAIL_DIRECTORIES = mustFail unspecified-mustFail uncategorized-mustFail
MUSTPASS_DIRECTORIES = mustPass
SHOULDPASS_DIRECTORIES = shouldPass
INTEGRATION_DIRECTORIES = integration
UNIT_DIRECTORIES = unitTests
THIRD_PARTY_DIRECTORIES = lcc-tests clight-tests-unit cil llvm-regression llvm-unit
TORTURE_DIRECTORIES = gcc-torture
CSMITH_DIRECTORIES = csmith
UNDEFFAIL_DIRECTORIES = undef-fail
UNDEFPASS_DIRECTORIES = undef-pass
WORKINGFAIL_DIRECTORIES = working-fail
WORKINGPASS_DIRECTORIES = working-pass
ALL_DIRECTORIES = $(GOOD_DIRECTORIES) $(SHOULDFAIL_DIRECTORIES) $(MUSTFAIL_DIRECTORIES) \
$(MUSTPASS_DIRECTORIES) $(SHOULDPASS_DIRECTORIES) $(INTEGRATION_DIRECTORIES) \
$(UNIT_DIRECTORIES) $(THIRD_PARTY_DIRECTORIES) $(TORTURE_DIRECTORIES) $(CSMITH_DIRECTORIES) \
$(UNDEFFAIL_DIRECTORIES) $(UNDEFPASS_DIRECTORIES) \
$(WORKINGPASS_DIRECTORIES) $(WORKINGFAIL_DIRECTORIES)
GOOD_TARGETS = $(foreach var, $(GOOD_DIRECTORIES), results-pass-$(var).xml)
SHOULDFAIL_TARGETS = $(foreach var, $(SHOULDFAIL_DIRECTORIES), results-fail-$(var).xml)
MUSTFAIL_TARGETS = $(foreach var, $(MUSTFAIL_DIRECTORIES), results-fail-$(var).xml)
MUSTPASS_TARGETS = $(foreach var, $(MUSTPASS_DIRECTORIES), results-runs-$(var).xml)
SHOULDPASS_TARGETS = $(foreach var, $(SHOULDPASS_DIRECTORIES), results-runs-$(var).xml)
INTEGRATION_TARGETS = $(foreach var, $(INTEGRATION_DIRECTORIES), results-pass-$(var).xml)
UNIT_TARGETS = $(foreach var, $(UNIT_DIRECTORIES), results-pass-$(var).xml)
THIRD_PARTY_TARGETS = $(foreach var, $(THIRD_PARTY_DIRECTORIES), results-pass-$(var).xml)
TORTURE_TARGETS = $(foreach var, $(TORTURE_DIRECTORIES), results-pass-$(var).xml)
CSMITH_TARGETS = $(foreach var, $(CSMITH_DIRECTORIES), results-pass-$(var).xml)
UNDEFFAIL_TARGETS = $(foreach var, $(UNDEFFAIL_DIRECTORIES), results-fail-$(var).xml)
UNDEFPASS_TARGETS = $(foreach var, $(UNDEFPASS_DIRECTORIES), results-pass-$(var).xml)
WORKINGFAIL_TARGETS = $(foreach var, $(WORKINGFAIL_DIRECTORIES), results-fail-$(var).xml)
WORKINGPASS_TARGETS = $(foreach var, $(WORKINGPASS_DIRECTORIES), results-pass-$(var).xml)
CLEAN_TARGETS = $(foreach var, $(ALL_DIRECTORIES), clean-$(var))
all: $(PARSER) test
integration: $(INTEGRATION_TARGETS)
undef: $(UNDEFPASS_TARGETS) $(UNDEFFAIL_TARGETS)
working: $(WORKINGPASS_TARGETS) $(WORKINGFAIL_TARGETS)
unit: $(MUSTPASS_TARGETS) $(MUSTFAIL_TARGETS) adhoc $(UNIT_TARGETS)
adhoc: results-adhoc.xml
results-adhoc.xml:
@perl adhocTests.pl
thirdParty: $(THIRD_PARTY_TARGETS)
torture: $(TORTURE_TARGETS)
csmith: $(CSMITH_TARGETS)
#.INTERMEDIATE: test-%.kcc test-%.gcc output-% retval-%
#.PRECIOUS: test-%.kcc test-%.gcc output-% retval-% compare-%.pass
.PHONY: all test clean good shouldFail clean-% adhoc csmith torture thirdParty integration
test: good
#@$(MAKE) -C ../semantics dynamic-c-expressions.pdf
@echo "Tests finished running."
good: $(GOOD_TARGETS)
# not really shouldFail, but should<whatever>
shouldFail: $(SHOULDFAIL_TARGETS) $(SHOULDPASS_TARGETS)
results-pass-%.xml:
@perl runtest.pl -p $*
results-runs-%.xml:
@perl runtest.pl -r $*
results-fail-%.xml:
@perl runtest.pl -f $*
clean: $(CLEAN_TARGETS) clean-./
@-rm *.o *.a
@-rm "1"
$(MAKE) -C gcc-test clean
clean-%:
@-rm -f ./$*/*.parsed.c ./$*/*.compcert.c ./$*/*.gcc ./$*/*.kcc ./$*/*.o ./$*/*.pass ./$*/*.tmp ./$*/*.log ./$*/*.cil ./$*/*-gen.maude ./$*/*.gen.maude ./$*/*.pre.gen ./$*/*.prepre.gen ./$*/*.xml ./$*/a.out ./$*/*.kdump