[PATCH] D29529: [libFuzzer] Properly configure tests for Windows.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 3 19:07:36 PST 2017


Lgtm
On Fri, Feb 3, 2017 at 6:49 PM Marcos Pividori via Phabricator <
reviews at reviews.llvm.org> wrote:

> mpividori created this revision.
>
> This configuration is necessary, and is included in all the tests suites,
> like the one for clang, for the main llvm repository, etc.
> We need to execute: `config.test_format = lit.formats.ShTest(False)`
> Otherwise, lit will try to use bash, which generated the problems
> mentioned in: https://reviews.llvm.org/D29515  , or cmd prompt which
> generates a lot of problems.
>
>
> https://reviews.llvm.org/D29529
>
> Files:
>   lib/Fuzzer/test/lit.cfg
>
>
> Index: lib/Fuzzer/test/lit.cfg
> ===================================================================
> --- lib/Fuzzer/test/lit.cfg
> +++ lib/Fuzzer/test/lit.cfg
> @@ -6,6 +6,23 @@
>  config.suffixes = ['.test']
>  config.test_source_root = os.path.dirname(__file__)
>
> +# 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.
> +config.test_format = lit.formats.ShTest(execute_external)
> +
>  # Tweak PATH to include llvm tools dir and current exec dir.
>  llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
>  if (not llvm_tools_dir) or (not os.path.exists(llvm_tools_dir)):
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170204/99bd7247/attachment.html>


More information about the llvm-commits mailing list