[Lldb-commits] [lldb] r281696 - add availability check to DarwinLog event tests
Todd Fiala via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 15 20:07:14 PDT 2016
Date: Thu Sep 15 22:07:14 2016
New Revision: 281696
add availability check to DarwinLog event tests
The pexpect-based tests properly checked for the stub reporting
DarwinLog support. The event-based ones did not. This is fixed
here. Swift CI bots are not currently building debugserver on
macOS, so they don't have the DarwinLog support even when they
pass the macOS 10.12 check.
--- lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/darwin_log.py Thu Sep 15 22:07:14 2016
@@ -325,6 +325,11 @@ class DarwinLogEventBasedTestBase(lldbte
self.runCmd("settings set target.process.extra-startup-command "
+ def darwin_log_available(self):
+ match = self.match("plugin structured-data darwin-log status",
+ patterns=[r"Availability: ([\S]+)"])
+ return match is not None and (match.group(1) == "available")
def do_test(self, enable_options, settings_commands=None,
"""Runs the test inferior, returning collected events.
@@ -401,6 +406,14 @@ class DarwinLogEventBasedTestBase(lldbte
# And our one and only breakpoint should have been hit.
+ # Check if DarwinLog is available. This check cannot be done
+ # until after the process has started, as the feature availability
+ # comes through the stub. The stub isn't running until
+ # the target process is running. So this is really the earliest
+ # we can check.
+ if not self.darwin_log_available():
+ self.skipTest("DarwinLog not available")
# Now setup the structured data listener.
# Grab the broadcaster for the process. We'll be attaching our
More information about the lldb-commits