2007-07-16 08:35:52 +04:00
|
|
|
LEVEL = ../../..
|
|
|
|
include $(LEVEL)/Makefile.common
|
2007-07-11 21:01:13 +04:00
|
|
|
|
2008-06-08 03:20:33 +04:00
|
|
|
TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization Rewriter
|
2008-03-10 22:32:31 +03:00
|
|
|
|
|
|
|
# Only run rewriter tests on darwin.
|
|
|
|
ifeq ($(OS),Darwin)
|
2008-06-08 03:20:33 +04:00
|
|
|
TESTDIRS += Analysis-Apple
|
2008-03-10 22:32:31 +03:00
|
|
|
endif
|
|
|
|
|
2008-04-07 02:32:01 +04:00
|
|
|
ifdef VERBOSE
|
|
|
|
PROGRESS = echo $<
|
|
|
|
REPORTFAIL = cat $@
|
|
|
|
DONE = true
|
|
|
|
else
|
|
|
|
PROGRESS = printf '.'
|
|
|
|
REPORTFAIL = (echo; echo '----' $< 'failed ----')
|
|
|
|
DONE = echo
|
|
|
|
endif
|
|
|
|
|
|
|
|
TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \))))
|
|
|
|
|
|
|
|
Output/%.testresults: %
|
|
|
|
@ $(PROGRESS)
|
|
|
|
@ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) ./TestRunner.sh $< > $@ || $(REPORTFAIL)
|
|
|
|
|
2007-07-16 08:35:52 +04:00
|
|
|
all::
|
2008-04-07 02:32:01 +04:00
|
|
|
@ mkdir -p $(addprefix Output/, $(TESTDIRS))
|
|
|
|
@ rm -f $(TESTS)
|
|
|
|
@ echo '--- Running clang tests ---'
|
|
|
|
@ $(MAKE) $(TESTS)
|
|
|
|
@ $(DONE)
|
|
|
|
|
|
|
|
report: $(TESTS)
|
|
|
|
@ cat $^
|
2008-03-18 10:03:00 +03:00
|
|
|
|
|
|
|
clean::
|
2008-03-20 17:28:22 +03:00
|
|
|
@ rm -rf Output/
|
2008-03-18 10:03:00 +03:00
|
|
|
|
2008-04-07 02:32:01 +04:00
|
|
|
.PHONY: all report clean
|