[Lldb-commits] [lldb] 4fccdd5 - [lldb] Fix bug in skipIfRosetta decorator
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 5 20:51:15 PDT 2020
Author: Jonas Devlieghere
Date: 2020-08-05T20:51:07-07:00
New Revision: 4fccdd5c85d05b3b03d029f533762e233259573c
URL: https://github.com/llvm/llvm-project/commit/4fccdd5c85d05b3b03d029f533762e233259573c
DIFF: https://github.com/llvm/llvm-project/commit/4fccdd5c85d05b3b03d029f533762e233259573c.diff
LOG: [lldb] Fix bug in skipIfRosetta decorator
Currently, the skipIfRosetta decorator will skip tests with the message
"not on macOS" on all platforms that are not `darwin` or `macosx`.
Instead, it should only check the platform and architecture when running
on these platforms.
This triggers for example when running the test suite on device.
Differential revision: https://reviews.llvm.org/D85388
Added:
Modified:
lldb/packages/Python/lldbsuite/test/decorators.py
Removed:
################################################################################
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py
index a472e1c4c52e..bdfe6ffd58c0 100644
--- a/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -538,10 +538,9 @@ def are_sb_headers_missing():
def skipIfRosetta(bugnumber):
"""Skip a test when running the testsuite on macOS under the Rosetta translation layer."""
def is_running_rosetta(self):
- if not lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
- return "not on macOS"
- if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
- return "skipped under Rosetta"
+ if lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
+ if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
+ return "skipped under Rosetta"
return None
return skipTestIfFn(is_running_rosetta)
More information about the lldb-commits
mailing list