[Lldb-commits] [lldb] r352086 - Unbreak windows bots

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 24 11:16:45 PST 2019


Author: adrian
Date: Thu Jan 24 11:16:45 2019
New Revision: 352086

URL: http://llvm.org/viewvc/llvm-project?rev=352086&view=rev
Log:
Unbreak windows bots

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=352086&r1=352085&r2=352086&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Jan 24 11:16:45 2019
@@ -1311,15 +1311,16 @@ class Base(unittest2.TestCase):
 
     def getDwarfVersion(self):
         """ Returns the dwarf version generated by clang or 'unknown'. """
-        if 'clang' not in self.getCompiler():
-            return 'unknown'
-        driver_output = check_output(
-            [self.getCompiler()] + '-g -c -x c - -o - -###'.split(),
-            stderr=STDOUT)
-        for line in driver_output.split(os.linesep):
-            m = re.search('dwarf-version=([0-9])', line)
-            if m:
-                return m.group(1)
+        if 'clang' in self.getCompiler():
+            try:
+                driver_output = check_output(
+                    [self.getCompiler()] + '-g -c -x c - -o - -###'.split(),
+                    stderr=STDOUT)
+                for line in driver_output.split(os.linesep):
+                    m = re.search('dwarf-version=([0-9])', line)
+                    if m:
+                        return m.group(1)
+            except: pass
         return 'unknown'
 
     def platformIsDarwin(self):




More information about the lldb-commits mailing list