diff options
Diffstat (limited to 'lldb/test/lldbtest.py')
| -rw-r--r-- | lldb/test/lldbtest.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py index dcb4a753120..82195c1ec67 100644 --- a/lldb/test/lldbtest.py +++ b/lldb/test/lldbtest.py @@ -593,7 +593,7 @@ def expectedFailureOS(oslist, bugnumber=None, compilers=None): def expectedFailureDarwin(bugnumber=None, compilers=None): # For legacy reasons, we support both "darwin" and "macosx" as OS X triples. - return expectedFailureOS(['darwin', 'macosx'], bugnumber, compilers) + return expectedFailureOS(getDarwinOSTriples(), bugnumber, compilers) def expectedFailureFreeBSD(bugnumber=None, compilers=None): return expectedFailureOS(['freebsd'], bugnumber, compilers) @@ -664,9 +664,12 @@ def skipIfFreeBSD(func): """Decorate the item to skip tests that should be skipped on FreeBSD.""" return skipIfPlatform(["freebsd"])(func) +def getDarwinOSTriples(): + return ['darwin', 'macosx', 'ios'] + def skipIfDarwin(func): """Decorate the item to skip tests that should be skipped on Darwin.""" - return skipIfPlatform(["darwin", "macosx"])(func) + return skipIfPlatform(getDarwinOSTriples())(func) def skipIfLinux(func): """Decorate the item to skip tests that should be skipped on Linux.""" @@ -678,7 +681,7 @@ def skipIfWindows(func): def skipUnlessDarwin(func): """Decorate the item to skip tests that should be skipped on any non Darwin platform.""" - return skipUnlessPlatform(["darwin", "macosx"])(func) + return skipUnlessPlatform(getDarwinOSTriples())(func) def skipIfPlatform(oslist): """Decorate the item to skip tests if running on one of the listed platforms.""" @@ -1387,6 +1390,11 @@ class Base(unittest2.TestCase): version = m.group(1) return version + def platformIsDarwin(self): + """Returns true if the OS triple for the selected platform is any valid apple OS""" + platform_name = self.getPlatform() + return platform_name in getDarwinOSTriples() + def getPlatform(self): """Returns the platform the test suite is running on.""" platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2] |

