diff options
| author | Reid Kleckner <reid@kleckner.net> | 2013-04-11 13:34:18 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2013-04-11 13:34:18 +0000 |
| commit | 0675f85ef208cdf26b0596e661a24ee8a7289bbd (patch) | |
| tree | 3baace6f5b9d7db0f519d541fe1c0c36700d366f /clang | |
| parent | 37e8fe13e040afff347cb2a63835921f9cec3f84 (diff) | |
| download | bcm5719-llvm-0675f85ef208cdf26b0596e661a24ee8a7289bbd.tar.gz bcm5719-llvm-0675f85ef208cdf26b0596e661a24ee8a7289bbd.zip | |
Use lit's internal shell runner on Windows for Clang tests
The behavior can be overridden by setting LIT_USE_INTERNAL_SHELL=0 in
the environment.
This fixes issues with /dev/null for me and brings the test suite time
down to 30s. =D
llvm-svn: 179283
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/test/lit.cfg | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/clang/test/lit.cfg b/clang/test/lit.cfg index 4466f0fc074..e8b39575646 100644 --- a/clang/test/lit.cfg +++ b/clang/test/lit.cfg @@ -24,12 +24,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.getBashPath() not in [None, ""]) config.test_format = lit.formats.ShTest(execute_external) # suffixes: A list of file extensions to treat as test files. @@ -219,7 +228,7 @@ if platform.system() not in ['FreeBSD']: config.available_features.add('crash-recovery') # Shell execution -if platform.system() not in ['Windows'] or lit.getBashPath() != '': +if execute_external: config.available_features.add('shell') # Exclude MSYS due to transforming '/' to 'X:/mingwroot/'. |

