[dotest] Disable color while testing.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 17 Jul 2019 17:56:57 +0000 (17:56 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 17 Jul 2019 17:56:57 +0000 (17:56 +0000)
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.

llvm-svn: 366356

lldb/packages/Python/lldbsuite/test/lldbtest.py

index 0fbdfd8..35f0c76 100644 (file)
@@ -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=')