From 38c5318662c51ea02415e81ff4a5fc52df1c9d35 Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Fri, 15 Jul 2016 00:51:26 +0000 Subject: 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 --- .../Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lldb/packages/Python/lldbsuite') 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)"), -- cgit v1.2.3