fix darwin_log test errors on macOS < 10.12

The newer event-based tests I added neglected to do the
macOS 10.12 check in the setup.  This caused earlier macOS
test suite runs to attempt to compile code that doesn't exist.

llvm-svn: 279672
This commit is contained in:
Todd Fiala 2016-08-24 21:40:29 +00:00
parent a8c7371d16
commit b17ac35f20

View File

@ -296,6 +296,15 @@ class DarwinLogEventBasedTestBase(lldbtest.TestBase):
# Call super's setUp().
super(DarwinLogEventBasedTestBase, self).setUp()
# Until other systems support this, exit
# early if we're not macOS version 10.12
# or greater.
version = platform.mac_ver()[0].split('.')
if ((int(version[0]) == 10) and (int(version[1]) < 12) or
(int(version[0]) < 10)):
self.skipTest("DarwinLog tests currently require macOS 10.12+")
return
# Source filename.
self.source = 'main.c'