[clang-tools-extra] r237832 - Copy lit shell changes from clang to clang-tools-extra, excluding some failing tests

Reid Kleckner reid at kleckner.net
Wed May 20 13:33:18 PDT 2015


Author: rnk
Date: Wed May 20 15:33:18 2015
New Revision: 237832

URL: http://llvm.org/viewvc/llvm-project?rev=237832&view=rev
Log:
Copy lit shell changes from clang to clang-tools-extra, excluding some failing tests

Modified:
    clang-tools-extra/trunk/test/clang-modernize/HeaderReplacements/main.cpp
    clang-tools-extra/trunk/test/lit.cfg

Modified: clang-tools-extra/trunk/test/clang-modernize/HeaderReplacements/main.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-modernize/HeaderReplacements/main.cpp?rev=237832&r1=237831&r2=237832&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/clang-modernize/HeaderReplacements/main.cpp (original)
+++ clang-tools-extra/trunk/test/clang-modernize/HeaderReplacements/main.cpp Wed May 20 15:33:18 2015
@@ -26,6 +26,8 @@
 // COMMON_CPP:     {{^common.cpp_.*.yaml$}}
 // COMMON_CPP-NOT: {{common.cpp_.*.yaml}}
 
+// REQUIRES: shell
+
 #include "common.h"
 
 void test_header_replacement() {

Modified: clang-tools-extra/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/lit.cfg?rev=237832&r1=237831&r2=237832&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/lit.cfg (original)
+++ clang-tools-extra/trunk/test/lit.cfg Wed May 20 15:33:18 2015
@@ -25,12 +25,21 @@ if platform.system() == 'Windows':
                                      config.environment['PATH']))
         config.environment['PATH'] = path
 
+# Choose between lit's internal shell pipeline runner and a real shell.  If
+# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
+use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
+if use_lit_shell:
+    # 0 is external, "" is default, and everything else is internal.
+    execute_external = (use_lit_shell == "0")
+else:
+    # Otherwise we default to internal on Windows and external elsewhere, as
+    # bash on Windows is usually very slow.
+    execute_external = (not sys.platform in ['win32'])
+
 # testFormat: The test format to use to interpret tests.
 #
 # For now we require '&&' between commands, until they get globally killed and
 # the test runner updated.
-execute_external = (platform.system() != 'Windows'
-                    or lit_config.getBashPath() not in [None, ""])
 config.test_format = lit.formats.ShTest(execute_external)
 
 # suffixes: A list of file extensions to treat as test files.
@@ -168,9 +177,13 @@ if platform.system() not in ['FreeBSD']:
     config.available_features.add('crash-recovery')
 
 # Shell execution
-if platform.system() not in ['Windows'] or lit_config.getBashPath() != '':
+if execute_external:
     config.available_features.add('shell')
 
+# Exclude MSYS due to transforming '/' to 'X:/mingwroot/'.
+if not platform.system() in ['Windows'] or not execute_external:
+    config.available_features.add('shell-preserves-root')
+
 # ANSI escape sequences in non-dumb terminal
 if platform.system() not in ['Windows']:
     config.available_features.add('ansi-escape-sequences')





More information about the cfe-commits mailing list