From e28740ce722403b7d416dc014713da3265dec263 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 24 Jan 2019 20:09:17 +0000 Subject: Only check the dwarf version when using the dwarf category llvm-svn: 352094 --- lldb/packages/Python/lldbsuite/test/decorators.py | 6 ++++-- lldb/packages/Python/lldbsuite/test/lldbtest.py | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'lldb/packages/Python') diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index 140c0ef617e..41ecf795a38 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -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 diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index b969a1992ed..6844ae02ec1 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -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""" -- cgit v1.2.3