Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 1 | LEVEL = ../../.. |
| 2 | include $(LEVEL)/Makefile.common |
| 3 | |
Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 4 | TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization |
| 5 | |
| 6 | # Only run rewriter tests on darwin. |
| 7 | ifeq ($(OS),Darwin) |
| 8 | TESTDIRS += Rewriter |
| 9 | endif |
| 10 | |
Gabor Greif | 947a8b5 | 2008-03-17 15:07:59 +0000 | [diff] [blame] | 11 | TESTS = $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \))) |
Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 12 | |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 13 | %.testresults: % |
| 14 | @ printf '.' |
| 15 | @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts ./TestRunner.sh $< > $@ || (echo; echo '----' $< 'failed ----') |
Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 16 | |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 17 | all:: |
Gabor Greif | 5ca1b5a | 2008-03-17 12:35:00 +0000 | [diff] [blame] | 18 | @ echo '--- Running clang tests ---' |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 19 | @ $(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 Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 24 | |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 25 | report: $(TESTS) |
| 26 | @ cat $^ |
Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 27 | |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 28 | testclean: |
| 29 | @ rm -f $(TESTS) |
Gabor Greif | 021e970 | 2008-03-15 07:26:41 +0000 | [diff] [blame] | 30 | |
Gabor Greif | 53c5567 | 2008-03-17 15:37:09 +0000 | [diff] [blame^] | 31 | .PHONY: all report testclean |