aprantl created this revision. aprantl added reviewers: davide, friss. This allows skipping a test when running the testsuite on macOS under the Rosetta translation layer.
https://reviews.llvm.org/D83600 Files: lldb/packages/Python/lldbsuite/test/decorators.py Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -552,6 +552,14 @@ return skipTestIfFn(are_sb_headers_missing)(func) +def skipIfRosetta(func, bugnumber=None): + """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 False + return platform.uname()[5] == "arm" and self.getArchitecture() == "x86_64" + return skipTestIfFn(is_running_rosetta, bugnumber)(func) + def skipIfiOSSimulator(func): """Decorate the item to skip tests that should be skipped on the iOS Simulator.""" def is_ios_simulator():
Index: lldb/packages/Python/lldbsuite/test/decorators.py =================================================================== --- lldb/packages/Python/lldbsuite/test/decorators.py +++ lldb/packages/Python/lldbsuite/test/decorators.py @@ -552,6 +552,14 @@ return skipTestIfFn(are_sb_headers_missing)(func) +def skipIfRosetta(func, bugnumber=None): + """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 False + return platform.uname()[5] == "arm" and self.getArchitecture() == "x86_64" + return skipTestIfFn(is_running_rosetta, bugnumber)(func) + def skipIfiOSSimulator(func): """Decorate the item to skip tests that should be skipped on the iOS Simulator.""" def is_ios_simulator():
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits