diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-04-10 13:11:38 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-04-10 13:11:38 +0000 |
commit | 3ca3fc563255eff0251f2d92ed44ffedaf8d5dd7 (patch) | |
tree | 37d73cd483d49b80dd5bc7f775d034355c0d738b /test/lit.cfg | |
parent | 7ef742dca17ee5971af94cda040f545cdd3464b2 (diff) | |
download | llvm-3ca3fc563255eff0251f2d92ed44ffedaf8d5dd7.tar.gz llvm-3ca3fc563255eff0251f2d92ed44ffedaf8d5dd7.tar.bz2 llvm-3ca3fc563255eff0251f2d92ed44ffedaf8d5dd7.tar.xz |
[test] Use lit's shell test runner on Windows
Summary:
I did a local comparison between using bash and using lit's runner, and
more of the suite passes with lit than passes with bash. Most of the
bash failures have to do with /dev/null, which is nonsensical on
Windows, but the lit runner handles it.
The lit shell runner is also much faster than bash, so I would expect
most Windows devs would want it by default.
The behavior can be overridden on any OS by setting
LIT_USE_INTERNAL_SHELL to 0 or 1 in the environment.
Reviewers: chapuni, ddunbar
CC: llvm-commits, timurrrr
Differential Revision: http://llvm-reviews.chandlerc.com/D559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r-- | test/lit.cfg | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/lit.cfg b/test/lit.cfg index 0ecd8feb26..a716387142 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -22,9 +22,18 @@ if sys.platform in ['win32']: 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. -execute_external = (not sys.platform in ['win32'] - or lit.getBashPath() not in [None, ""]) config.test_format = lit.formats.ShTest(execute_external) # To ignore test output on stderr so it doesn't trigger failures uncomment this: @@ -240,7 +249,7 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/|-)\bclang\b(?!-)", ### Features # Shell execution -if sys.platform not in ['win32'] or lit.getBashPath() != '': +if execute_external: config.available_features.add('shell') # Loadable module |