2007-07-16 12:35:52 +08:00
|
|
|
LEVEL = ../../..
|
|
|
|
include $(LEVEL)/Makefile.common
|
2006-06-18 13:42:02 +08:00
|
|
|
|
2008-04-07 06:32:01 +08:00
|
|
|
TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization
|
2008-03-11 03:32:31 +08:00
|
|
|
|
|
|
|
# Only run rewriter tests on darwin.
|
|
|
|
ifeq ($(OS),Darwin)
|
2008-03-27 05:51:44 +08:00
|
|
|
TESTDIRS += Rewriter Analysis-Apple
|
2008-03-11 03:32:31 +08:00
|
|
|
endif
|
|
|
|
|
2008-04-07 06:32:01 +08: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 12:35:52 +08:00
|
|
|
all::
|
2008-04-07 06:32:01 +08:00
|
|
|
@ mkdir -p $(addprefix Output/, $(TESTDIRS))
|
|
|
|
@ rm -f $(TESTS)
|
|
|
|
@ echo '--- Running clang tests ---'
|
|
|
|
@ $(MAKE) $(TESTS)
|
|
|
|
@ $(DONE)
|
|
|
|
|
|
|
|
report: $(TESTS)
|
|
|
|
@ cat $^
|
2008-03-18 15:03:00 +08:00
|
|
|
|
|
|
|
clean::
|
2008-03-20 22:28:22 +08:00
|
|
|
@ rm -rf Output/
|
2008-03-18 15:03:00 +08:00
|
|
|
|
2008-04-07 06:32:01 +08:00
|
|
|
.PHONY: all report clean
|