summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-30 01:39:58 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-30 01:39:58 +0000
commit5ccbccfce0209eed8154236cf673416ee8d7ea9b (patch)
tree0c8f5a563c90fa68e34b66d89a917cb49c3a1cb3 /lldb/test/python_api
parent147c83ed4d55d6a2a12fb9d42a4857cd3241c36a (diff)
downloadbcm5719-llvm-5ccbccfce0209eed8154236cf673416ee8d7ea9b.tar.gz
bcm5719-llvm-5ccbccfce0209eed8154236cf673416ee8d7ea9b.zip
Add a @benchmarks_test decorator for test method we want to categorize as benchmarks test.
The test driver now takes an option "+b" which enables to run just the benchmarks tests. By default, tests decorated with the @benchmarks_test decorator do not get run. Add an example benchmarks test directory which contains nothing for the time being, just to demonstrate the @benchmarks_test concept. For example, $ ./dotest.py -v benchmarks ... ---------------------------------------------------------------------- Collected 2 tests 1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase) Test repeated expressions with gdb. ... skipped 'benchmarks tests' 2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase) Test repeated expressions with lldb. ... skipped 'benchmarks tests' ---------------------------------------------------------------------- Ran 2 tests in 0.047s OK (skipped=2) $ ./dotest.py -v +b benchmarks ... ---------------------------------------------------------------------- Collected 2 tests 1: test_with_gdb (TestRepeatedExprs.RepeatedExprssCase) Test repeated expressions with gdb. ... running test_with_gdb benchmarks result for test_with_gdb ok 2: test_with_lldb (TestRepeatedExprs.RepeatedExprssCase) Test repeated expressions with lldb. ... running test_with_lldb benchmarks result for test_with_lldb ok ---------------------------------------------------------------------- Ran 2 tests in 0.270s OK Also mark some Python API tests which are missing the @python_api_test decorator. llvm-svn: 136553
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r--lldb/test/python_api/lldbutil/frame/TestFrameUtils.py1
-rw-r--r--lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py3
-rw-r--r--lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py1
-rw-r--r--lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py1
4 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
index d980aba020c..068077b5494 100644
--- a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
+++ b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
@@ -18,6 +18,7 @@ class FrameUtilsTestCase(TestBase):
self.line = line_number('main.c',
"// Find the line number here.")
+ @python_api_test
def test_frame_utils(self):
"""Test utility functions for the frame object."""
self.buildDefault()
diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
index 1ec5c4b1a5d..e0022a0aaac 100644
--- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -19,16 +19,19 @@ class LLDBIteratorTestCase(TestBase):
self.line1 = line_number('main.cpp', '// Set break point at this line.')
self.line2 = line_number('main.cpp', '// And that line.')
+ @python_api_test
def test_lldb_iter_module(self):
"""Test module_iter works correctly for SBTarget -> SBModule."""
self.buildDefault()
self.lldb_iter_module()
+ @python_api_test
def test_lldb_iter_breakpoint(self):
"""Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint."""
self.buildDefault()
self.lldb_iter_breakpoint()
+ @python_api_test
def test_lldb_iter_frame(self):
"""Test iterator works correctly for SBProcess->SBThread->SBFrame."""
self.buildDefault()
diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
index f706365f1d9..a869d5bcc7e 100644
--- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -18,6 +18,7 @@ class RegistersIteratorTestCase(TestBase):
# Find the line number to break inside main().
self.line1 = line_number('main.cpp', '// Set break point at this line.')
+ @python_api_test
def test_iter_registers(self):
"""Test iterator works correctly for lldbutil.iter_registers()."""
self.buildDefault()
diff --git a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
index a84fa690a9b..e67436a4666 100644
--- a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
+++ b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
@@ -18,6 +18,7 @@ class ThreadsStackTracesTestCase(TestBase):
# Find the line number to break inside main().
self.line = line_number('main.cpp', '// Set break point at this line.')
+ @python_api_test
def test_stack_traces(self):
"""Test SBprocess and SBThread APIs with printing of the stack traces."""
self.buildDefault()
OpenPOWER on IntegriCloud