blob: 710fb4cce2192c7f6ca9a4cd917db5f5d66b8a61 [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)
8TESTDIRS += Rewriter
9endif
10
Gabor Greif119c65d2008-03-17 16:29:58 +000011ifdef VERBOSE
12PROGRESS = echo $<
13REPORTFAIL = cat $@
14else
15PROGRESS = printf '.'
16REPORTFAIL = (echo; echo '----' $< 'failed ----')
17endif
18
Gabor Greife1d26472008-03-17 15:58:58 +000019TESTS = $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \))))
Gabor Greif021e9702008-03-15 07:26:41 +000020
Gabor Greife1d26472008-03-17 15:58:58 +000021Output/%.testresults: %
Gabor Greif119c65d2008-03-17 16:29:58 +000022 @ $(PROGRESS)
23 @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || $(REPORTFAIL)
Gabor Greif021e9702008-03-15 07:26:41 +000024
Gabor Greif53c55672008-03-17 15:37:09 +000025all::
Gabor Greife1d26472008-03-17 15:58:58 +000026 @ rm -f $(TESTS)
Gabor Greif5ca1b5a2008-03-17 12:35:00 +000027 @ echo '--- Running clang tests ---'
Gabor Greif53c55672008-03-17 15:37:09 +000028 @ $(MAKE) -f Makefile.parallel $(TESTS)
Gabor Greif021e9702008-03-15 07:26:41 +000029
Gabor Greif53c55672008-03-17 15:37:09 +000030report: $(TESTS)
31 @ cat $^
Gabor Greif021e9702008-03-15 07:26:41 +000032
Gabor Greife1d26472008-03-17 15:58:58 +000033.PHONY: all report