blob: c110edb6088a0123104420b5cf9e41a04a0d9287 [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 Greif947a8b52008-03-17 15:07:59 +000011TESTS = $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \)))
Gabor Greif021e9702008-03-15 07:26:41 +000012
Gabor Greif53c55672008-03-17 15:37:09 +000013%.testresults: %
14 @ printf '.'
15 @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || (echo; echo '----' $< 'failed ----')
Gabor Greif021e9702008-03-15 07:26:41 +000016
Gabor Greif53c55672008-03-17 15:37:09 +000017all::
Gabor Greif5ca1b5a2008-03-17 12:35:00 +000018 @ echo '--- Running clang tests ---'
Gabor Greif53c55672008-03-17 15:37:09 +000019 @ $(MAKE) -f Makefile.parallel testclean
20 @ $(MAKE) -f Makefile.parallel $(TESTS)
21 @ echo
22 @ $(MAKE) -f Makefile.parallel report
23 @ $(MAKE) -f Makefile.parallel testclean
Gabor Greif021e9702008-03-15 07:26:41 +000024
Gabor Greif53c55672008-03-17 15:37:09 +000025report: $(TESTS)
26 @ cat $^
Gabor Greif021e9702008-03-15 07:26:41 +000027
Gabor Greif53c55672008-03-17 15:37:09 +000028testclean:
29 @ rm -f $(TESTS)
Gabor Greif021e9702008-03-15 07:26:41 +000030
Gabor Greif53c55672008-03-17 15:37:09 +000031.PHONY: all report testclean