Skip to content

Commit a06b364

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') (cherry picked from commit 74c8d01)
1 parent f4b4df3 commit a06b364

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
@@ -551,13 +551,15 @@ def are_sb_headers_missing():
551551
return skipTestIfFn(are_sb_headers_missing)(func)
552552

553553

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

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

0 commit comments

Comments
 (0)