Skip to content

Commit d0f8516

Browse files
author
git apple-llvm automerger
committed
Merge commit '52dd5edd5424' from apple/stable/20200108 into swift/release/5.3
2 parents 6d5903b + 52dd5ed commit d0f8516

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

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

554554

555+
def skipIfRosetta(bugnumber):
556+
"""Skip a test when running the testsuite on macOS under the Rosetta translation layer."""
557+
def is_running_rosetta(self):
558+
if not lldbplatformutil.getPlatform() in ['darwin', 'macosx']:
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)
564+
555565
def skipIfiOSSimulator(func):
556566
"""Decorate the item to skip tests that should be skipped on the iOS Simulator."""
557567
def is_ios_simulator():

0 commit comments

Comments
 (0)