Author: Adrian Prantl Date: 2020-07-14T18:16:17-07:00 New Revision: 74c8d01aff80a7371ea2ff16fbe84858a266711a
URL: https://github.com/llvm/llvm-project/commit/74c8d01aff80a7371ea2ff16fbe84858a266711a DIFF: https://github.com/llvm/llvm-project/commit/74c8d01aff80a7371ea2ff16fbe84858a266711a.diff LOG: 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') Added: Modified: lldb/packages/Python/lldbsuite/test/decorators.py Removed: ################################################################################ diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index be282f6db32c..534bcbf59ac2 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -552,13 +552,15 @@ def are_sb_headers_missing(): return skipTestIfFn(are_sb_headers_missing)(func) -def skipIfRosetta(func, bugnumber=None): +def skipIfRosetta(bugnumber): """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) + return "not on macOS" + if (platform.uname()[5] == "arm") and (self.getArchitecture() == "x86_64"): + return "skipped under Rosetta" + return None + return skipTestIfFn(is_running_rosetta) def skipIfiOSSimulator(func): """Decorate the item to skip tests that should be skipped on the iOS Simulator.""" _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits