blob: 35f9025934a289f000c603f2a55ab3dba7076f67 [file] [log] [blame]
Chris Lattner1467e032007-07-16 04:35:52 +00001LEVEL = ../../..
2include $(LEVEL)/Makefile.common
Reid Spencer5f016e22007-07-11 17:01:13 +00003
Chris Lattner9d294b92008-04-06 22:32:01 +00004TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization
Chris Lattner15bd7992008-03-10 19:32:31 +00005
6# Only run rewriter tests on darwin.
7ifeq ($(OS),Darwin)
Ted Kremenek2daf5b62008-03-26 21:51:44 +00008TESTDIRS += Rewriter Analysis-Apple
Chris Lattner15bd7992008-03-10 19:32:31 +00009endif
10
Chris Lattner9d294b92008-04-06 22:32:01 +000011ifdef VERBOSE
12PROGRESS = echo $<
13REPORTFAIL = cat $@
14DONE = true
15else
16PROGRESS = printf '.'
17REPORTFAIL = (echo; echo '----' $< 'failed ----')
18DONE = echo
19endif
20
21TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \))))
22
23Output/%.testresults: %
24 @ $(PROGRESS)
25 @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) ./TestRunner.sh $< > $@ || $(REPORTFAIL)
26
Chris Lattner1467e032007-07-16 04:35:52 +000027all::
Chris Lattner9d294b92008-04-06 22:32:01 +000028 @ mkdir -p $(addprefix Output/, $(TESTDIRS))
29 @ rm -f $(TESTS)
30 @ echo '--- Running clang tests ---'
31 @ $(MAKE) $(TESTS)
32 @ $(DONE)
33
34report: $(TESTS)
35 @ cat $^
Gabor Greif17feadf2008-03-18 07:03:00 +000036
37clean::
Gabor Greif5267d7c2008-03-20 14:28:22 +000038 @ rm -rf Output/
Gabor Greif17feadf2008-03-18 07:03:00 +000039
Chris Lattner9d294b92008-04-06 22:32:01 +000040.PHONY: all report clean