diff options
author | Adrian Prantl <aprantl@apple.com> | 2020-07-14 18:12:19 -0700 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2020-07-14 18:16:17 -0700 |
commit | 74c8d01aff80a7371ea2ff16fbe84858a266711a (patch) | |
tree | 141dae2ffaa725a1ca58692a2b6fd903b4e268cc | |
parent | [flang] Fix out-of-tree build with missing acc_gen target (diff) | |
download | llvm-project-74c8d01aff80a7371ea2ff16fbe84858a266711a.tar.gz llvm-project-74c8d01aff80a7371ea2ff16fbe84858a266711a.tar.bz2 llvm-project-74c8d01aff80a7371ea2ff16fbe84858a266711a.zip |
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')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 10 |
1 files changed, 6 insertions, 4 deletions
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 skipIfNoSBHeaders(func): 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.""" |