[lldbsuite] Fix the mac version decorator to work on non-mac platforms
authorStella Stamenova <stilis@microsoft.com>
Tue, 16 Oct 2018 17:13:45 +0000 (17:13 +0000)
committerStella Stamenova <stilis@microsoft.com>
Tue, 16 Oct 2018 17:13:45 +0000 (17:13 +0000)
commite05451b73b5e0fe8cf52ba766914dd38a5adf4e4
treea322bc79c26fd4feb6252302c3fba1a7fca1fbe1
parent4b5ec7fb80d6fb855b2d6a33336c96182137b5d0
[lldbsuite] Fix the mac version decorator to work on non-mac platforms

Summary: 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.

Reviewers: labath, davide, asmith, shafik, jingham

Reviewed By: jingham

Subscribers: jingham, lldb-commits

Differential Revision: https://reviews.llvm.org/D53208

llvm-svn: 344623
lldb/packages/Python/lldbsuite/test/decorators.py