diff options
| author | Todd Fiala <todd.fiala@gmail.com> | 2016-08-19 03:03:58 +0000 |
|---|---|---|
| committer | Todd Fiala <todd.fiala@gmail.com> | 2016-08-19 03:03:58 +0000 |
| commit | a07e4a8352562f0d63191ed76a152166e14bb268 (patch) | |
| tree | 63b8691ddfcad1a9569002b503a830dd78a763e8 /lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source | |
| parent | fdc4c6b426aa6492ce3ed175fc6180aec5964fce (diff) | |
| download | bcm5719-llvm-a07e4a8352562f0d63191ed76a152166e14bb268.tar.gz bcm5719-llvm-a07e4a8352562f0d63191ed76a152166e14bb268.zip | |
Revert "Add StructuredData plugin type; showcase with new DarwinLog feature"
This reverts commit 1d885845d1451e7b232f53fba2e36be67aadabd8.
llvm-svn: 279200
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source')
6 files changed, 0 insertions, 239 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile deleted file mode 100644 index 214cedd96f1..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../../make - -C_SOURCES := main.c - -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py deleted file mode 100644 index d44437cd14b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py +++ /dev/null @@ -1,79 +0,0 @@ -""" -Test DarwinLog "source include debug-level" functionality provided by the -StructuredDataDarwinLog plugin. - -These tests are currently only supported when running against Darwin -targets. -""" - -from __future__ import print_function - -import lldb -import os -import re - -from lldbsuite.test import decorators -from lldbsuite.test import lldbtest -from lldbsuite.test import darwin_log - - -class TestDarwinLogSourceDebug(darwin_log.DarwinLogTestBase): - - mydir = lldbtest.TestBase.compute_mydir(__file__) - - def setUp(self): - # Call super's setUp(). - super(TestDarwinLogSourceDebug, self).setUp() - - # Source filename. - self.source = 'main.c' - - # Output filename. - self.exe_name = 'a.out' - self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - - # Locate breakpoint. - self.line = lldbtest.line_number(self.source, '// break here') - - # Indicate we want strict-sources behavior. - self.strict_sources = True - - def tearDown(self): - # Shut down the process if it's still running. - if self.child: - self.runCmd('process kill') - self.expect_prompt() - self.runCmd('quit') - - # Let parent clean up - super(TestDarwinLogSourceDebug, self).tearDown() - - # ========================================================================== - # source include/exclude debug filter tests - # ========================================================================== - - @decorators.skipUnlessDarwin - def test_source_default_exclude_debug(self): - """Test that default excluding of debug-level log messages works.""" - self.do_test([]) - - # We should only see the second log message as the first is a - # debug-level message and we're not including debug-level messages. - self.assertIsNotNone(self.child.match) - self.assertTrue((len(self.child.match.groups()) > 1) and - (self.child.match.group(2) == "cat2"), - "first log line should not be present, second log line " - "should be") - - @decorators.skipUnlessDarwin - def test_source_explicitly_include_debug(self): - """Test that explicitly including debug-level log messages works.""" - self.do_test(["--debug"]) - - # We should only see the second log message as the first is a - # debug-level message and we're not including debug-level messages. - self.assertIsNotNone(self.child.match) - self.assertTrue((len(self.child.match.groups()) > 1) and - (self.child.match.group(2) == "cat1"), - "first log line should be present since we're " - "including debug-level log messages") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c deleted file mode 100644 index 1f5cd1aa6c7..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/main.c +++ /dev/null @@ -1,34 +0,0 @@ -//===-- main.c --------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include <os/log.h> -#include <stdio.h> - -#include "../../common/darwin_log_common.h" - -int main(int argc, char** argv) -{ - os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1"); - os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2"); - if (!logger_sub1 || !logger_sub2) - return 1; - - // Note we cannot use the os_log() line as the breakpoint because, as of - // the initial writing of this test, we get multiple breakpoints for that - // line, which confuses the pexpect test logic. - printf("About to log\n"); // break here - os_log_debug(logger_sub1, "source-log-sub1-cat1"); - os_log(logger_sub2, "source-log-sub2-cat2"); - - // Sleep, as the darwin log reporting doesn't always happen until a bit - // later. We need the message to come out before the process terminates. - sleep(FINAL_WAIT_SECONDS); - - return 0; -} diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile deleted file mode 100644 index 214cedd96f1..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -LEVEL = ../../../../make - -C_SOURCES := main.c - -include $(LEVEL)/Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py deleted file mode 100644 index d47d85a27fd..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py +++ /dev/null @@ -1,82 +0,0 @@ -""" -Test DarwinLog "source include info-level" functionality provided by the -StructuredDataDarwinLog plugin. - -These tests are currently only supported when running against Darwin -targets. -""" - -from __future__ import print_function - -import lldb -import os -import re - -from lldbsuite.test import decorators -from lldbsuite.test import lldbtest -from lldbsuite.test import darwin_log - - -class TestDarwinLogSourceInfo(darwin_log.DarwinLogTestBase): - - mydir = lldbtest.TestBase.compute_mydir(__file__) - - def setUp(self): - # Call super's setUp(). - super(TestDarwinLogSourceInfo, self).setUp() - - # Source filename. - self.source = 'main.c' - - # Output filename. - self.exe_name = 'a.out' - self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name} - - # Locate breakpoint. - self.line = lldbtest.line_number(self.source, '// break here') - - # Indicate we want strict-sources behavior. - self.strict_sources = True - - def tearDown(self): - # Shut down the process if it's still running. - if self.child: - self.runCmd('process kill') - self.expect_prompt() - self.runCmd('quit') - - # Let parent clean up - super(TestDarwinLogSourceInfo, self).tearDown() - - # ========================================================================== - # source include/exclude debug filter tests - # ========================================================================== - - @decorators.skipUnlessDarwin - @decorators.expectedFailureAll(bugnumber="rdar://27316264") - def test_source_exclude_info_level(self): - """Test that default excluding of info-level log messages works.""" - self.do_test([]) - - # We should only see the second log message as the first is an - # info-level message and we're not including debug-level messages. - self.assertIsNotNone(self.child.match) - self.assertTrue((len(self.child.match.groups()) > 1) and - (self.child.match.group(2) == "cat2"), - "first log line should not be present, second log line " - "should be") - - @decorators.skipUnlessDarwin - def test_source_include_info_level(self): - """Test that explicitly including info-level log messages works.""" - self.do_test( - ["--info"] - ) - - # We should only see the second log message as the first is a - # debug-level message and we're not including debug-level messages. - self.assertIsNotNone(self.child.match) - self.assertTrue((len(self.child.match.groups()) > 1) and - (self.child.match.group(2) == "cat1"), - "first log line should be present since we're " - "including info-level log messages") diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c b/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c deleted file mode 100644 index 5ab6f39c007..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/main.c +++ /dev/null @@ -1,34 +0,0 @@ -//===-- main.c --------------------------------------------------*- C++ -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#include <os/log.h> -#include <stdio.h> - -#include "../../common/darwin_log_common.h" - -int main(int argc, char** argv) -{ - os_log_t logger_sub1 = os_log_create("org.llvm.lldb.test.sub1", "cat1"); - os_log_t logger_sub2 = os_log_create("org.llvm.lldb.test.sub2", "cat2"); - if (!logger_sub1 || !logger_sub2) - return 1; - - // Note we cannot use the os_log() line as the breakpoint because, as of - // the initial writing of this test, we get multiple breakpoints for that - // line, which confuses the pexpect test logic. - printf("About to log\n"); // break here - os_log_info(logger_sub1, "source-log-sub1-cat1"); - os_log(logger_sub2, "source-log-sub2-cat2"); - - // Sleep, as the darwin log reporting doesn't always happen until a bit - // later. We need the message to come out before the process terminates. - sleep(FINAL_WAIT_SECONDS); - - return 0; -} |

