[Lldb-commits] [lldb] r366356 - [dotest] Disable color while testing.

Adrian McCarthy via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 17 11:41:59 PDT 2019


I thought the color code was smart enough to figure out whether it was
actually going to an actual terminal or being redirected.  Is this hiding a
bug in that logic?

On Wed, Jul 17, 2019 at 10:56 AM Jonas Devlieghere via lldb-commits <
lldb-commits at lists.llvm.org> wrote:

> Author: jdevlieghere
> Date: Wed Jul 17 10:56:57 2019
> New Revision: 366356
>
> URL: http://llvm.org/viewvc/llvm-project?rev=366356&view=rev
> Log:
> [dotest] Disable color while testing.
>
> Disable colors so we don't risk having unexpected ANSI codes in the test
> output. Currently, the behavior of a test can change depending on
> whether it's run under a color-supporting terminal, or under a dummy
> terminal, for example when using lit or multiprocessing.
>
> Modified:
>     lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
>
> Modified: lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py?rev=366356&r1=366355&r2=366356&view=diff
>
> ==============================================================================
> --- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
> +++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Wed Jul 17
> 10:56:57 2019
> @@ -1869,6 +1869,9 @@ class TestBase(Base):
>          # differ in the debug info, which is not being hashed.
>          self.runCmd('settings set symbols.enable-external-lookup false')
>
> +        # Disable color.
> +        self.runCmd("settings set use-color false")
> +
>          # Make sure that a sanitizer LLDB's environment doesn't get
> passed on.
>          if 'DYLD_LIBRARY_PATH' in os.environ:
>              self.runCmd('settings set target.env-vars DYLD_LIBRARY_PATH=')
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190717/8d0da916/attachment.html>


More information about the lldb-commits mailing list