mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 12:26:52 +08:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user