Makefile 1.01 KB
Newer Older
dbarbera's avatar
dbarbera committed
1
all: test-ada test-llvm
Maxime Perrotin's avatar
Maxime Perrotin committed
2

dbarbera's avatar
dbarbera committed
3
4
test-parse:
	../../../opengeode.py myfunction.pr system_structure.pr --check
Maxime Perrotin's avatar
Maxime Perrotin committed
5

dbarbera's avatar
dbarbera committed
6
test-ada:
7
	../../../opengeode.py --toAda myfunction.pr system_structure.pr || exit 1
Maxime Perrotin's avatar
Maxime Perrotin committed
8
	asn1.exe -Ada dataview-uniq.asn -typePrefix asn1Scc -equal
Maxime Perrotin's avatar
Maxime Perrotin committed
9
	asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc
dbarbera's avatar
dbarbera committed
10
	gnatmake -c myfunction.adb
dbarbera's avatar
dbarbera committed
11
	gcc -c test_ada.c
12
	gnatbind -n myfunction.ali
dbarbera's avatar
dbarbera committed
13
	gnatlink -o testcase test_ada.o myfunction.ali -lgnat
14
	./testcase | diff expected -
Maxime Perrotin's avatar
Maxime Perrotin committed
15

dbarbera's avatar
dbarbera committed
16
test-llvm:
dbarbera's avatar
dbarbera committed
17
18
	../../../opengeode.py myfunction.pr system_structure.pr --check --llvm
	asn1.exe -c dataview-uniq.asn -typePrefix asn1Scc -equal
dbarbera's avatar
dbarbera committed
19
	llc myfunction.ll
dbarbera's avatar
dbarbera committed
20
21
22
23
	gcc -c myfunction.s
	gcc -c dataview-uniq.c
	gcc -c test_llvm.c
	gcc myfunction.o dataview-uniq.o test_llvm.o -o testcase
dbarbera's avatar
dbarbera committed
24
	./testcase | diff expected -
dbarbera's avatar
dbarbera committed
25

Maxime Perrotin's avatar
Maxime Perrotin committed
26
27
28
29
coverage:
	coverage run  -p ../../../opengeode.py myfunction.pr system_structure.pr --toAda

clean:
dbarbera's avatar
dbarbera committed
30
	rm -rf *.adb *.ads *.pyc runSpark.sh spark.idx *.o *.ali gnat.cfg examiner \
31
	bin *.wrn *.gpr datav*.? ber.c xer.c asn1crt.? acn.c real.c testcase *.ll *.s