diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2016-07-15 00:51:26 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2016-07-15 00:51:26 +0000 |
commit | 38c5318662c51ea02415e81ff4a5fc52df1c9d35 (patch) | |
tree | d683955bf593bcf0fcfd2b693a9e3603fbc0c350 /lldb/packages/Python/lldbsuite/test | |
parent | 6e2aa5e1a93ef561cc127f2291b5074a7d4b9b9e (diff) | |
download | bcm5719-llvm-38c5318662c51ea02415e81ff4a5fc52df1c9d35.tar.gz bcm5719-llvm-38c5318662c51ea02415e81ff4a5fc52df1c9d35.zip |
adjust one of the NSLog output tests to only run on macOS 10.12+
The LLDB NSLog handling when Xcode intends to suppress NSLog
output only works on Fall 2016 OS releases. Skip it on earlier
OSes.
llvm-svn: 275506
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py b/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py index 8d0b7e10311..769f483eca8 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py +++ b/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py @@ -11,6 +11,7 @@ from __future__ import print_function import lldb import os import pexpect +import platform import re import sys @@ -128,6 +129,12 @@ class DarwinNSLogOutputTestCase(lldbtest.TestBase): def test_nslog_output_is_suppressed_with_env_var(self): """Test that NSLog() output does not show up with the ignore env var.""" + # This test will only work properly on macOS 10.12+. Skip it on earlier versions. + # This will require some tweaking on iOS. + match = re.match(r"^\d+\.(\d+)", platform.mac_ver()[0]) + if match is None or int(match.group(1)) < 12: + self.skipTest("requires macOS 10.12 or higher") + self.do_test( expect_regexes=[ re.compile(r"(This is a message from NSLog)"), |