[Lldb-commits] [lldb] r352094 - Only check the dwarf version when using the dwarf category

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 24 12:09:17 PST 2019


Author: adrian
Date: Thu Jan 24 12:09:17 2019
New Revision: 352094

URL: http://llvm.org/viewvc/llvm-project?rev=352094&view=rev
Log:
Only check the dwarf version when using the dwarf category

Modified:
    lldb/trunk/packages/Python/lldbsuite/test/decorators.py
    lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py

Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=352094&r1=352093&r2=352094&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Thu Jan 24 12:09:17 2019
@@ -198,8 +198,10 @@ def _decorateTest(mode,
                 macos_version[1],
                 platform.mac_ver()[0])))
         skip_for_dwarf_version = (
-            dwarf_version is None) or _check_expected_version(
-                dwarf_version[0], dwarf_version[1], self.getDwarfVersion())
+             dwarf_version is None) or (
+                 (self.getDebugInfo() is 'dwarf') and
+                 _check_expected_version(
+                     dwarf_version[0], dwarf_version[1], self.getDwarfVersion()))
 
         # For the test to be skipped, all specified (e.g. not None) parameters must be True.
         # An unspecified parameter means "any", so those are marked skip by default.  And we skip

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=352094&r1=352093&r2=352094&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/lldbtest.py Thu Jan 24 12:09:17 2019
@@ -1310,7 +1310,7 @@ class Base(unittest2.TestCase):
         return version
 
     def getDwarfVersion(self):
-        """ Returns the dwarf version generated by clang or 'unknown'. """
+        """ Returns the dwarf version generated by clang or '0'. """
         if 'clang' in self.getCompiler():
             try:
                 driver_output = check_output(
@@ -1321,7 +1321,7 @@ class Base(unittest2.TestCase):
                     if m:
                         return m.group(1)
             except: pass
-        return 'unknown'
+        return '0'
 
     def platformIsDarwin(self):
         """Returns true if the OS triple for the selected platform is any valid apple OS"""




More information about the lldb-commits mailing list