Skip to content

Commit 4fccdd5

Browse files
committed
[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
1 parent 633e3da commit 4fccdd5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,9 @@ def are_sb_headers_missing():
538538
def skipIfRosetta(bugnumber):
539539
"""Skip a test when running the testsuite on macOS under the Rosetta translation layer."""
540540
def is_running_rosetta(self):
541-
if not lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
542-
return "not on macOS"
543-
if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
544-
return "skipped under Rosetta"
541+
if lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
542+
if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
543+
return "skipped under Rosetta"
545544
return None
546545
return skipTestIfFn(is_running_rosetta)
547546

0 commit comments

Comments
 (0)