]> granicus.if.org Git - clang/commitdiff
Update test/Makefile to allow testing when using a separate obj
authorDaniel Dunbar <daniel@zuster.org>
Thu, 21 Aug 2008 02:48:23 +0000 (02:48 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 21 Aug 2008 02:48:23 +0000 (02:48 +0000)
directory.
 - Also, return proper error code if testing fails.

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

test/Makefile

index 5971b61de05761b6b819f86416f31235ba9841da..fb1ccfc4b6b80b46de35aa6864f9b41f5109a434 100644 (file)
@@ -1,8 +1,8 @@
 LEVEL = ../../..
 include $(LEVEL)/Makefile.common
 
-# Test in all non .svn or Output directories below this one.
-TESTDIRS = $(shell find . -name . -o -name .svn -prune -o -name Output -prune -o -type d -print)
+# Test in all immediate subdirectories.
+TESTDIRS = $(shell echo $(PROJ_SRC_DIR)/*/)
 
 # Only run rewriter tests on darwin.
 ifeq ($(OS),Darwin)
@@ -23,7 +23,7 @@ TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS)
 
 Output/%.testresults: %
        @ $(PROGRESS)
-       @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) ./TestRunner.sh $< > $@ || $(REPORTFAIL)
+       @ PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) $(PROJ_SRC_DIR)/TestRunner.sh $< > $@ || $(REPORTFAIL)
 
 all::
        @ mkdir -p $(addprefix Output/, $(TESTDIRS))
@@ -31,6 +31,7 @@ all::
        @ echo '--- Running clang tests ---'
        @ $(MAKE) $(TESTS)
        @ $(DONE)
+       @ cat $(TESTS) | count 0
 
 report: $(TESTS)
        @ cat $^