Commit 7ad2e7d1 authored by dbarbera's avatar dbarbera
Browse files

Refactor test-rules in Makefiles

parent 216381cb
DISABLED_TESTS=test-branchcoverage/
TEST_CASES=$(filter-out $(DISABLED_TESTS), $(sort $(dir $(wildcard */))))
DISABLED_BENCHMARKS=test1/ test2/ test3/ test4/ test5/ test6/ test7/ test9/ test12/ test-branchcoverage/
DISABLED_BENCHMARKS=test1/ test2/ test3/ test4/ test5/ test6/ test7/ test9/ \
test12/ test-branchcoverage/
BENCHMARK_CASES=$(filter-out $(DISABLED_BENCHMARKS), $(sort $(dir $(wildcard */))))
test-parse:
......
......@@ -12,4 +12,23 @@ clean:
real.c xer.c ber.c acn.c asn1crt.c asn1crt.h test_ada test_llvm \
*.autosave
%.o: %.pr FORCE
$(OPENGEODE) $< system_structure.pr --llvm
$(LLC) $*.ll
$(CC) -c $*.s
%.ali: %.pr FORCE
$(OPENGEODE) $< system_structure.pr --toAda
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c *.adb
%.o: %.asn FORCE
$(ASN1SCC) -c $< -typePrefix asn1Scc -equal
$(CC) -c $*.c
%.o: %.c FORCE
$(CC) -c $<
FORCE:
.PHONY: clean
\ No newline at end of file
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) controlflow.pr system_structure.pr --check
test-ada:
$(OPENGEODE) controlflow.pr system_structure.pr --check --toAda
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: controlflow.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n controlflow.ali
$(GNATLINK) test_ada.o controlflow.ali -lgnat -lm -o test_ada
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) controlflow.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) controlflow.ll
$(CC) -c controlflow.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: controlflow.o dataview-uniq.o | test_llvm.o
$(CC) controlflow.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,22 +8,12 @@ edit:
test-parse:
$(OPENGEODE) challenge.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda challenge.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: challenge.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n challenge.ali
$(GNATLINK) -o test_ada test_ada.o challenge.ali -lgnat -lm
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) challenge.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) challenge.ll
$(CC) -c challenge.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: challenge.o dataview-uniq.o | test_llvm.o
$(CC) challenge.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) expressions.pr system_structure.pr --check
test-ada:
$(OPENGEODE) expressions.pr system_structure.pr --check --toAda
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: expressions.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n expressions.ali
$(GNATLINK) test_ada.o expressions.ali -lgnat -lm -o test_ada
./test_ada
test-llvm:
$(OPENGEODE) expressions.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) expressions.ll
$(CC) -c expressions.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: expressions.o dataview-uniq.o | test_llvm.o
$(CC) expressions.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm
......
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) operators.pr system_structure.pr --check
test-ada:
$(OPENGEODE) operators.pr system_structure.pr --check --toAda
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: operators.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n operators.ali
$(GNATLINK) test_ada.o operators.ali -lgnat -lm -o test_ada
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) operators.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) operators.ll
$(CC) -c operators.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: operators.o dataview-uniq.o | test_llvm.o
$(CC) operators.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) myfunction.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda myfunction.pr system_structure.pr || exit 1
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c myfunction.adb
$(CC) -c test_ada.c
test-ada: myfunction.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n myfunction.ali
$(GNATLINK) -o test_ada test_ada.o myfunction.ali -lgnat
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) myfunction.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -equal -typePrefix asn1Scc
$(LLC) myfunction.ll
$(CC) -c myfunction.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: myfunction.o dataview-uniq.o | test_llvm.o
$(CC) myfunction.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) og.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda og.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c og.adb
test-ada: og.ali
test-llvm:
$(OPENGEODE) og.pr system_structure.pr --llvm
$(LLC) og.ll
$(CC) -c og.s
test-llvm: og.o
coverage:
coverage run -p $(OPENGEODE) og.pr system_structure.pr --toAda
......
......@@ -8,22 +8,12 @@ edit:
test-parse:
$(OPENGEODE) challenge.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda challenge.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: challenge.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n challenge.ali
$(GNATLINK) -o test_ada test_ada.o challenge.ali -lgnat -lm
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) challenge.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) challenge.ll
$(CC) -c challenge.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: challenge.o dataview-uniq.o | test_llvm.o
$(CC) challenge.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm| diff expected -
......
......@@ -8,22 +8,12 @@ edit:
test-parse:
$(OPENGEODE) og.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda og.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: og.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n og.ali
$(GNATLINK) -o test_ada test_ada.o og.ali -lgnat
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) og.pr system_structure.pr --llvm
$(ASN1SCC) -c dataview-uniq.asn -equal -typePrefix asn1Scc
$(LLC) og.ll
$(CC) -c og.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: og.o dataview-uniq.o | test_llvm.o
$(CC) og.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,18 +8,9 @@ edit:
test-parse:
$(OPENGEODE) trafficlight.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda trafficlight.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c *.adb
#$(CC) -c test.c
#$(GNATBIND) -n trafficlight.ali
#$(GNATLINK) -o testcase test.o trafficlight.ali -lgnat -lm
test-llvm:
$(OPENGEODE) trafficlight.pr system_structure.pr --llvm
$(LLC) trafficlight.ll
$(CC) -c trafficlight.s
test-ada: trafficlight.ali
test-llvm: trafficlight.o
test-export:
$(OPENGEODE) --png --pdf --svg trafficlight.pr system_structure.pr
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) orchestrator.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda orchestrator.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c orchestrator.adb
test-ada: orchestrator.ali
test-llvm:
$(OPENGEODE) orchestrator.pr system_structure.pr --llvm
$(LLC) orchestrator.ll
$(CC) -c orchestrator.s
test-llvm: orchestrator.o
coverage:
coverage run -p $(OPENGEODE) orchestrator.pr system_structure.pr --toAda
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) fce.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda fce.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c fce.adb
test-ada: fce.ali
test-llvm:
$(OPENGEODE) fce.pr system_structure.pr --llvm
$(LLC) fce.ll
$(CC) -c fce.s
test-llvm: fce.o
coverage:
coverage run -p $(OPENGEODE) fce.pr system_structure.pr --toAda
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) orchestrator.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda orchestrator.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c orchestrator.adb
test-ada: orchestrator.ali
test-llvm:
$(OPENGEODE) orchestrator.pr system_structure.pr --llvm
$(LLC) orchestrator.ll
$(CC) -c orchestrator.s
test-llvm: orchestrator.o
coverage:
coverage run -p $(OPENGEODE) orchestrator.pr system_structure.pr --toAda
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) function0.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda function0.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c function0.adb
test-ada: function0.ali
test-llvm:
$(OPENGEODE) function0.pr system_structure.pr --llvm
$(LLC) function0.ll
$(CC) -c function0.s
test-llvm: function0.o
coverage:
coverage run -p $(OPENGEODE) function0.pr system_structure.pr --toAda
......
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) myfunction.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda myfunction.pr system_structure.pr || exit 1
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c myfunction.adb
$(CC) -c test_ada.c
test-ada: myfunction.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n myfunction.ali
$(GNATLINK) -o test_ada test_ada.o myfunction.ali -lgnat
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) myfunction.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) myfunction.ll
$(CC) -c myfunction.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: myfunction.o dataview-uniq.o | test_llvm.o
$(CC) myfunction.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) orchestrator.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda orchestrator.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c orchestrator.adb
test-ada: orchestrator.ali
test-llvm:
$(OPENGEODE) orchestrator.pr system_structure.pr --llvm
$(LLC) orchestrator.ll
$(CC) -c orchestrator.s
test-llvm: orchestrator.o
coverage:
coverage run -p $(OPENGEODE) orchestrator.pr system_structure.pr --toAda
......
......@@ -8,23 +8,12 @@ edit:
test-parse:
$(OPENGEODE) --check orchestrator.pr system_structure.pr
test-ada:
$(OPENGEODE) --toAda orchestrator.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc
$(GNATMAKE) -c *.adb
$(CC) -c test_ada.c
test-ada: orchestrator.ali dataview-uniq.o | test_ada.o
$(GNATBIND) -n orchestrator.ali
$(GNATLINK) -o test_ada test_ada.o orchestrator.ali -lgnat
./test_ada | diff expected -
test-llvm:
$(OPENGEODE) orchestrator.pr system_structure.pr --check --llvm
$(ASN1SCC) -c dataview-uniq.asn -typePrefix asn1Scc -equal
$(LLC) orchestrator.ll
$(CC) -c orchestrator.s
$(CC) -c dataview-uniq.c
$(CC) -c test_llvm.c
test-llvm: orchestrator.o dataview-uniq.o | test_llvm.o
$(CC) orchestrator.o dataview-uniq.o test_llvm.o -o test_llvm -lm
./test_llvm | diff expected -
......
......@@ -8,15 +8,9 @@ edit:
test-parse:
$(OPENGEODE) challenge.pr system_structure.pr --check
test-ada:
$(OPENGEODE) --toAda challenge.pr system_structure.pr
$(ASN1SCC) -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
$(GNATMAKE) -c challenge.adb
test-ada: challenge.ali
test-llvm:
$(OPENGEODE) challenge.pr system_structure.pr --llvm
$(LLC) challenge.ll
$(CC) -c challenge.s
test-llvm: challenge.o
coverage:
coverage run -p $(OPENGEODE) challenge.pr system_structure.pr --toAda
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment