blob: a88ff0e7a3ec6f1095cd9aeaa8b774d14b1c131f [file] [log] [blame]
Gabor Greif021e9702008-03-15 07:26:41 +00001LEVEL = ../../..
2include $(LEVEL)/Makefile.common
3
Gabor Greif021e9702008-03-15 07:26:41 +00004TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization
5
6# Only run rewriter tests on darwin.
7ifeq ($(OS),Darwin)
Ted Kremenek2daf5b62008-03-26 21:51:44 +00008TESTDIRS += Rewriter Analysis-Apple
Gabor Greif021e9702008-03-15 07:26:41 +00009endif
10
Gabor Greif119c65d2008-03-17 16:29:58 +000011ifdef VERBOSE
12PROGRESS = echo $<
13REPORTFAIL = cat $@
Gabor Greifb4992db2008-03-17 18:36:14 +000014DONE = true
Gabor Greif119c65d2008-03-17 16:29:58 +000015else
16PROGRESS = printf '.'
17REPORTFAIL = (echo; echo '----' $< 'failed ----')
Gabor Greifb4992db2008-03-17 18:36:14 +000018DONE = echo
Gabor Greif119c65d2008-03-17 16:29:58 +000019endif
20
Gabor Greif65307dc2008-03-20 08:09:10 +000021TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \))))
Gabor Greif021e9702008-03-15 07:26:41 +000022
Gabor Greife1d26472008-03-17 15:58:58 +000023Output/%.testresults: %
Gabor Greif119c65d2008-03-17 16:29:58 +000024 @ $(PROGRESS)
Gabor Greif1e2db032008-03-20 22:50:54 +000025 @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) ./TestRunner.sh $< > $@ || $(REPORTFAIL)
Gabor Greif021e9702008-03-15 07:26:41 +000026
Gabor Greif53c55672008-03-17 15:37:09 +000027all::
Gabor Greif17feadf2008-03-18 07:03:00 +000028 @ mkdir -p $(addprefix Output/, $(TESTDIRS))
Gabor Greife1d26472008-03-17 15:58:58 +000029 @ rm -f $(TESTS)
Gabor Greif5ca1b5a2008-03-17 12:35:00 +000030 @ echo '--- Running clang tests ---'
Gabor Greif53c55672008-03-17 15:37:09 +000031 @ $(MAKE) -f Makefile.parallel $(TESTS)
Gabor Greifb4992db2008-03-17 18:36:14 +000032 @ $(DONE)
Gabor Greif021e9702008-03-15 07:26:41 +000033
Gabor Greif53c55672008-03-17 15:37:09 +000034report: $(TESTS)
35 @ cat $^
Gabor Greif021e9702008-03-15 07:26:41 +000036
Gabor Greif17feadf2008-03-18 07:03:00 +000037clean::
Gabor Greif5267d7c2008-03-20 14:28:22 +000038 @ rm -rf Output/
Gabor Greif17feadf2008-03-18 07:03:00 +000039
40.PHONY: all report clean