]> granicus.if.org Git - clang/commitdiff
Switch to the new test runner.
authorDaniel Dunbar <daniel@zuster.org>
Sat, 13 Jun 2009 18:28:48 +0000 (18:28 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 13 Jun 2009 18:28:48 +0000 (18:28 +0000)
 - TestRunner.sh still needs to be moved over.

 - Please let me know if you find problems / missing features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73298 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile

index 1ebaedd6b7da1673a0803e6f996527bbc8e2ea69..271f46fdd6dc9cb847a1e7d59e901cee8717a39d 100644 (file)
@@ -4,42 +4,17 @@ include $(LEVEL)/Makefile.common
 # Test in all immediate subdirectories if unset.
 TESTDIRS ?= $(shell echo $(PROJ_SRC_DIR)/*/)
 
-# Only run rewriter tests on darwin.
-ifeq ($(OS),Darwin)
-TESTDIRS += 
-endif
-
+ifndef TESTARGS
 ifdef VERBOSE
-ifeq ($(VERBOSE),0)
-PROGRESS = :
-REPORTFAIL = echo 'FAIL: clang' $(TARGET_TRIPLE) $(subst $(LLVM_SRC_ROOT)/tools/clang/,,$<)
-DONE = $(LLVMToolDir)/clang -v
+TESTARGS = -v
 else
-PROGRESS = echo $<
-REPORTFAIL = cat $@
-DONE = true
+TESTARGS = -s
 endif
-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' -or -name '*.mm' -or -name '*.S' \) | grep -v "Output/")))
-Output/%.testresults: %
-       @ $(PROGRESS)
-       @ PATH=$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$$PATH VG=$(VG) $(PROJ_SRC_DIR)/TestRunner.sh $< > $@ || $(REPORTFAIL)
-
 all::
-       @ mkdir -p $(addprefix Output/, $(TESTDIRS))
-       @ rm -f $(TESTS)
        @ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
-       @ $(MAKE) $(TESTS)
-       @ $(DONE)
-       @ !(cat $(TESTS) | grep -q " FAILED! ")
-
-report: $(TESTS)
-       @ cat $^
+       @ PATH=$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$$PATH VG=$(VG) ../utils/test/MultiTestRunner.py $(TESTARGS) $(TESTDIRS)
 
 clean::
        @ rm -rf Output/