summaryrefslogtreecommitdiff
path: root/test/Makefile
blob: a0aa921f10d1cbad9990ca886fafbbaf77362362 (plain) (blame)
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
.PHONY: test1 test2 test3 test4 crashtest1 crashtest2 all crashes clean
.NOTPARALLEL: all allcrash

CC := gcc-5
CXX := g++-5

PLUGIN = ../build/src/.libs/astdumper.so
CMD = ${CXX} -c -fplugin=${PLUGIN} -fplugin-arg-astdumper-command=${1} ${2} -o a.out 2>${3}

all: test1 test2 test3 test4 clean
crashes: crashtest1 crashtest2 clean

clean:
	@rm a.out 2>/dev/null || true

test1:
	$(call CMD,dump,test1.c,test1-01.txt)
	$(call CMD,smalldump,test1.c,test1-02.txt)
	$(call CMD,memoryusage,test1.c,test1-03.txt)
	$(call CMD,dumpunsupported,test1.c,test1-04.txt)
test2:
	$(call CMD,dump,test2.c,test2-01.txt)
	$(call CMD,findargs,test2.c,test2-02.txt)
test3:
	$(call CMD,dump,test3.c,test3-01.txt)
	$(call CMD,findargs,test3.c,test3-02.txt)
test4:
	$(call CMD,dump,test4.c,test4-01.txt)
	$(call CMD,findargs,test4.c,test4-02.txt)

crashtest1:
	$(call CMD,dump,crashtest1.h,crashtest1-01.txt)
crashtest2:
	$(call CMD,dump,crashtest2.h,crashtest2-01.txt)