[Lldb-commits] [lldb] r275506 - adjust one of the NSLog output tests to only run on macOS 10.12+

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 14 17:51:26 PDT 2016

Author: tfiala
Date: Thu Jul 14 19:51:26 2016
New Revision: 275506

URL: http://llvm.org/viewvc/llvm-project?rev=275506&view=rev
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


Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py?rev=275506&r1=275505&r2=275506&view=diff
--- lldb/trunk/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py Thu Jul 14 19:51:26 2016
@@ -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
     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")
                 re.compile(r"(This is a message from NSLog)"),

More information about the lldb-commits mailing list