[PATCH] [test] Use lit's shell test runner on Windows

Daniel Dunbar daniel at zuster.org
Tue Apr 9 16:45:02 PDT 2013


Hi Reid,

LGTM, we definitely should prefer the internal runner by default, and
having an override to force the behavior seems reasonable.

 - Daniel


On Fri, Apr 5, 2013 at 8:20 AM, Reid Kleckner <rnk at google.com> wrote:

>     - Conditionalize execute_external on an environment variable.
>
> Hi chapuni,
>
> http://llvm-reviews.chandlerc.com/D559
>
> CHANGE SINCE LAST DIFF
>   http://llvm-reviews.chandlerc.com/D559?vs=1340&id=1525#toc
>
> Files:
>   test/lit.cfg
>
> Index: test/lit.cfg
> ===================================================================
> --- test/lit.cfg
> +++ test/lit.cfg
> @@ -22,9 +22,18 @@
>                                       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 @@
>  ### Features
>
>  # Shell execution
> -if sys.platform not in ['win32'] or lit.getBashPath() != '':
> +if execute_external:
>      config.available_features.add('shell')
>
>  # Loadable module
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130409/e57c7f4a/attachment.html>


More information about the llvm-commits mailing list