remove the old non-parallel test system.  'make' in clang/test now runs
the tests in parallel.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49290 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Makefile b/test/Makefile
index 38d0f3c..35f9025 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,19 +1,40 @@
 LEVEL = ../../..
 include $(LEVEL)/Makefile.common
 
-TESTDIRS := CodeGen Lexer Preprocessor Parser Sema Analysis Serialization
+TESTDIRS = CodeGen Lexer Preprocessor Parser Sema Analysis Serialization
 
 # Only run rewriter tests on darwin.
 ifeq ($(OS),Darwin)
 TESTDIRS += Rewriter Analysis-Apple
 endif
 
+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)
+
 all::
-	PATH=$$PATH:$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts VG=$(VG) \
-          find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' \) \
-	      -print -exec ./TestRunner.sh {} \;
+	@ mkdir -p $(addprefix Output/, $(TESTDIRS))
+	@ rm -f $(TESTS)
+	@ echo '--- Running clang tests ---'
+	@ $(MAKE) $(TESTS)
+	@ $(DONE)
+
+report: $(TESTS)
+	@ cat $^
 
 clean::
 	@ rm -rf Output/
 
-.PHONY: all clean
+.PHONY: all report clean