[Lldb-commits] [PATCH] D53208: [lldbsuite] Fix the mac version decorator to work on non-mac platforms

Stella Stamenova via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 12 10:50:24 PDT 2018


stella.stamenova created this revision.
stella.stamenova added reviewers: labath, davide, asmith, shafik.
Herald added a subscriber: lldb-commits.

On non-mac platforms, mac_ver returns an empty string which when converted to LooseVersion has no "version" property. This causes a failure when the decorator executes. Instead, check whether the value returned from mac_ver is an empty string and avoid the LooseVersion comparison.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D53208

Files:
  packages/Python/lldbsuite/test/decorators.py


Index: packages/Python/lldbsuite/test/decorators.py
===================================================================
--- packages/Python/lldbsuite/test/decorators.py
+++ packages/Python/lldbsuite/test/decorators.py
@@ -191,7 +191,7 @@
         skip_for_py_version = (
             py_version is None) or _check_expected_version(
             py_version[0], py_version[1], sys.version_info)
-        skip_for_macos_version = (macos_version is None) or (
+        skip_for_macos_version = (macos_version is None) or (platform.mac_ver()[0] == "") or (
             _check_expected_version(
                 macos_version[0],
                 macos_version[1],


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53208.169460.patch
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181012/cc267458/attachment.bin>


More information about the lldb-commits mailing list