forked from OSchip/llvm-project
[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
This commit is contained in:
parent
4b5ec7fb80
commit
e05451b73b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue