[compiler-rt] r229560 - Use lit's internal shell when running tests on Windows

Filipe Cabecinhas filcab at gmail.com
Wed Apr 8 09:28:10 PDT 2015


Hi Reid,

I know it's a late reply, but I recently ran into problems with this. The
problem is that Host == Windows is different from Target == Windows, and
disabling the external shell makes a bunch of /Posix/... tests fail, since
the internal shell doesn't seem to understand the "ENVVAR=value program
args" idiom.

This patch also makes the asan tests behave differently from other tests
(like ubsan), which made it much harder to track down.

I would say that if you want to keep this, at least move it to the top
lit.cfg, not asan's (Alexey also commented on this)
Did you actually see tests breaking when using the external shell? If so,
did you track them down to what was really wrong with it (different bash
versions for different users?)?
If it's just for speed I'd prefer that this patch was reverted until we fix
lit's shell interpreter and then bring it back to the top lit.cfg.

I can implement the env var support, but unfortunately I can't focus on it
a lot right now.

Thanks,

  Filipe

On Tue, Feb 17, 2015 at 9:57 PM, Reid Kleckner <reid at kleckner.net> wrote:

> Author: rnk
> Date: Tue Feb 17 15:57:10 2015
> New Revision: 229560
>
> URL: http://llvm.org/viewvc/llvm-project?rev=229560&view=rev
> Log:
> Use lit's internal shell when running tests on Windows
>
> The internal shell is faster and more predictable than any copy of
> bash.exe on the user's system.
>
> LLVM and Clang use the internal shell by default, and have an
> environment variable to disable it. I don't think compiler-rt needs that
> complexity, so I left it out.
>
> Modified:
>     compiler-rt/trunk/test/asan/lit.cfg
>
> Modified: compiler-rt/trunk/test/asan/lit.cfg
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=229560&r1=229559&r2=229560&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/asan/lit.cfg (original)
> +++ compiler-rt/trunk/test/asan/lit.cfg Tue Feb 17 15:57:10 2015
> @@ -3,6 +3,8 @@
>  import os
>  import platform
>
> +import lit.formats
> +
>  def get_required_attr(config, attr_name):
>    attr_value = getattr(config, attr_name, None)
>    if attr_value == None:
> @@ -25,6 +27,10 @@ def push_dynamic_library_lookup_path(con
>  # Setup config name.
>  config.name = 'AddressSanitizer' + config.name_suffix
>
> +# testFormat: The test format to use to interpret tests.
> +external_bash = (not sys.platform in ['win32'])
> +config.test_format = lit.formats.ShTest(external_bash)
> +
>  # Setup source root.
>  config.test_source_root = os.path.dirname(__file__)
>
>
>
> _______________________________________________
> 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/20150408/86c4aebb/attachment.html>


More information about the llvm-commits mailing list