summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorStella Stamenova <stilis@microsoft.com>2018-10-16 17:13:45 +0000
committerStella Stamenova <stilis@microsoft.com>2018-10-16 17:13:45 +0000
commite05451b73b5e0fe8cf52ba766914dd38a5adf4e4 (patch)
treea322bc79c26fd4feb6252302c3fba1a7fca1fbe1 /lldb/packages/Python/lldbsuite/test
parent4b5ec7fb80d6fb855b2d6a33336c96182137b5d0 (diff)
downloadbcm5719-llvm-e05451b73b5e0fe8cf52ba766914dd38a5adf4e4.tar.gz
bcm5719-llvm-e05451b73b5e0fe8cf52ba766914dd38a5adf4e4.zip
[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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/decorators.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index 59cd3191828..c45c365beb8 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -192,10 +192,10 @@ def _decorateTest(mode,
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 (
- _check_expected_version(
+ (platform.mac_ver()[0] != "") and (_check_expected_version(
macos_version[0],
macos_version[1],
- platform.mac_ver()[0]))
+ platform.mac_ver()[0])))
# 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
OpenPOWER on IntegriCloud