MultiTestRunner: Simplify, cleanup, and rename!
 - MultiTestRunner will eventually be renamed to 'lit', for LLVM integrated
   tester/testing. This has the pros of being pronouncable and short.

 - "Project" level configuration lives in 'lit.cfg', which is also what lit uses
   to find the root testing directory in some cases. This can be overridden for
   use in project files which want to precisely specify where things are.

 - TestRunner.py is not longer able to be invoked directly.
 
 - Moved some code to Util.py.

 - Introduced a configuration object.

 - Cleaned up --help, removed a few not-very-useful options.

 - Tried not to break anything that works. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77665 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 794e80b..58e7368 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -33,6 +33,7 @@
    add_custom_target(clang-test-${testdir} 
       ${PYTHON_EXECUTABLE} 
       ${LLVM_SOURCE_DIR}/tools/clang/utils/test/MultiTestRunner.py
+      "--root=${LLVM_SOURCE_DIR}/tools/clang/test"
       "--path=${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}"
       "--path=${LLVM_SOURCE_DIR}/test/Scripts"
       -s ${CLANG_TEST_EXTRA_ARGS}
@@ -48,6 +49,7 @@
   add_custom_target(clang-test
     ${PYTHON_EXECUTABLE} 
     ${LLVM_SOURCE_DIR}/tools/clang/utils/test/MultiTestRunner.py
+    "--root=${LLVM_SOURCE_DIR}/tools/clang/test"
     "--path=${LLVM_TOOLS_PATH}/${CMAKE_CFG_INTDIR}"
     "--path=${LLVM_SOURCE_DIR}/test/Scripts"
     -s ${CLANG_TEST_EXTRA_ARGS}
diff --git a/test/Makefile b/test/Makefile
index 97c9d27..13cbfe6 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -21,6 +21,7 @@
 all::
 	@ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
 	@ $(PROJ_SRC_DIR)/../utils/test/MultiTestRunner.py \
+	  --root $(PROJ_SRC_DIR) \
 	  --path $(ToolDir) \
 	  --path $(LLVM_SRC_ROOT)/test/Scripts \
 	  $(TESTARGS) $(TESTDIRS) $(VGARG)
diff --git a/test/lit.cfg b/test/lit.cfg
new file mode 100644
index 0000000..89ca044
--- /dev/null
+++ b/test/lit.cfg
@@ -0,0 +1,12 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+# suffixes: A list of file extensions to treat as test files.
+suffixes = ['.c', '.cpp']
+    
+# environment: The base environment to use when running test commands.
+#
+# The 'PATH' and 'SYSTEMROOT' variables will be set automatically from the lit
+# command line variables.
+environment = {}