Skip to content

Commit 74c8d01

Browse files
committed
Fix the skipIfRosetta decorator
the form that takes func as an argument isn't compatible with the optional bugnumber argument. This means that only correct for to use it is now @skipIfRosetta(bugnumber='url')
1 parent 8e9a505 commit 74c8d01

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -552,13 +552,15 @@ def are_sb_headers_missing():
552552
return skipTestIfFn(are_sb_headers_missing)(func)
553553

554554

555-
def skipIfRosetta(func, bugnumber=None):
555+
def skipIfRosetta(bugnumber):
556556
"""Skip a test when running the testsuite on macOS under the Rosetta translation layer."""
557557
def is_running_rosetta(self):
558558
if not lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
559-
return False
560-
return platform.uname()[5] == "arm" and self.getArchitecture() == "x86_64"
561-
return skipTestIfFn(is_running_rosetta, bugnumber)(func)
559+
return "not on macOS"
560+
if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"):
561+
return "skipped under Rosetta"
562+
return None
563+
return skipTestIfFn(is_running_rosetta)
562564

563565
def skipIfiOSSimulator(func):
564566
"""Decorate the item to skip tests that should be skipped on the iOS Simulator."""

0 commit comments

Comments
 (0)