Port the python api decorator to use test categories
Summary:
Per discussions on the mailing list, I have implemented a decorator which annotates individual
test methods with categories. I have used this framework to replace the '-a' and '+a'
command-line switches (now '-G pyapi' and '--skip-category pyapi') and the @python_api_test
decorator (now @add_test_categories('pyapi')). The test suite now gives an error message
suggesting the new options if the user specifies the deprecated +/-a switches. If the general
direction is good, I will follow this up with other switches.
Reviewers: tberghammer, tfiala, granata.enrico, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D14020
llvm-svn: 251277
diff --git a/lldb/test/python_api/breakpoint/TestBreakpointAPI.py b/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
index 245c142..4e984cc 100644
--- a/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
+++ b/lldb/test/python_api/breakpoint/TestBreakpointAPI.py
@@ -15,7 +15,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_breakpoint_is_valid(self):
"""Make sure that if an SBBreakpoint gets deleted its IsValid returns false."""
self.build()
diff --git a/lldb/test/python_api/class_members/TestSBTypeClassMembers.py b/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
index 6ead0af..6366a79 100644
--- a/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
+++ b/lldb/test/python_api/class_members/TestSBTypeClassMembers.py
@@ -25,7 +25,7 @@
self.line = line_number(self.source, '// set breakpoint here')
@skipUnlessDarwin
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Test SBType APIs to fetch member function types."""
d = {'EXE': self.exe_name}
diff --git a/lldb/test/python_api/debugger/TestDebuggerAPI.py b/lldb/test/python_api/debugger/TestDebuggerAPI.py
index add7ead..4071977 100644
--- a/lldb/test/python_api/debugger/TestDebuggerAPI.py
+++ b/lldb/test/python_api/debugger/TestDebuggerAPI.py
@@ -11,7 +11,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_debugger_api_boundary_condition(self):
"""Exercise SBDebugger APIs with boundary conditions."""
@@ -32,7 +32,7 @@
self.dbg.SetCurrentPlatform(None)
self.dbg.SetCurrentPlatformSDKRoot(None)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_debugger_delete_invalid_target(self):
"""SBDebugger.DeleteTarget() should not crash LLDB given and invalid target."""
target = lldb.SBTarget()
diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index fb8961d..0e6e053 100644
--- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -24,7 +24,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBAddress(self):
obj = lldb.SBAddress()
@@ -35,7 +35,7 @@
import sb_address
sb_address.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBBlock(self):
obj = lldb.SBBlock()
@@ -46,7 +46,7 @@
import sb_block
sb_block.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBBreakpoint(self):
obj = lldb.SBBreakpoint()
@@ -57,7 +57,7 @@
import sb_breakpoint
sb_breakpoint.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBBreakpointLocation(self):
obj = lldb.SBBreakpointLocation()
@@ -68,7 +68,7 @@
import sb_breakpointlocation
sb_breakpointlocation.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBBroadcaster(self):
obj = lldb.SBBroadcaster()
@@ -79,7 +79,7 @@
import sb_broadcaster
sb_broadcaster.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBCommandReturnObject(self):
"""SBCommandReturnObject object is valid after default construction."""
@@ -88,7 +88,7 @@
print(obj)
self.assertTrue(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBCommunication(self):
obj = lldb.SBCommunication()
@@ -99,7 +99,7 @@
import sb_communication
sb_communication.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBCompileUnit(self):
obj = lldb.SBCompileUnit()
@@ -110,7 +110,7 @@
import sb_compileunit
sb_compileunit.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBDebugger(self):
obj = lldb.SBDebugger()
@@ -121,7 +121,7 @@
import sb_debugger
sb_debugger.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
# darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail with 2.0.12 http://llvm.org/pr23488
def test_SBError(self):
@@ -133,7 +133,7 @@
import sb_error
sb_error.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBEvent(self):
obj = lldb.SBEvent()
@@ -146,7 +146,7 @@
import sb_event
sb_event.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_SBFileSpec(self):
obj = lldb.SBFileSpec()
# This is just to test that FileSpec(None) does not crash.
@@ -158,7 +158,7 @@
import sb_filespec
sb_filespec.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBFrame(self):
obj = lldb.SBFrame()
@@ -169,7 +169,7 @@
import sb_frame
sb_frame.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBFunction(self):
obj = lldb.SBFunction()
@@ -180,7 +180,7 @@
import sb_function
sb_function.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBInstruction(self):
obj = lldb.SBInstruction()
@@ -191,7 +191,7 @@
import sb_instruction
sb_instruction.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBInstructionList(self):
obj = lldb.SBInstructionList()
@@ -202,7 +202,7 @@
import sb_instructionlist
sb_instructionlist.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBLineEntry(self):
obj = lldb.SBLineEntry()
@@ -213,7 +213,7 @@
import sb_lineentry
sb_lineentry.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBListener(self):
obj = lldb.SBListener()
@@ -224,7 +224,7 @@
import sb_listener
sb_listener.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBModule(self):
obj = lldb.SBModule()
@@ -235,7 +235,7 @@
import sb_module
sb_module.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBProcess(self):
obj = lldb.SBProcess()
@@ -246,7 +246,7 @@
import sb_process
sb_process.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBSection(self):
obj = lldb.SBSection()
@@ -257,7 +257,7 @@
import sb_section
sb_section.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBStream(self):
"""SBStream object is valid after default construction."""
@@ -266,7 +266,7 @@
print(obj)
self.assertTrue(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBStringList(self):
obj = lldb.SBStringList()
@@ -277,7 +277,7 @@
import sb_stringlist
sb_stringlist.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBSymbol(self):
obj = lldb.SBSymbol()
@@ -288,7 +288,7 @@
import sb_symbol
sb_symbol.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBSymbolContext(self):
obj = lldb.SBSymbolContext()
@@ -299,7 +299,7 @@
import sb_symbolcontext
sb_symbolcontext.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBSymbolContextList(self):
"""SBSymbolContextList object is valid after default construction."""
@@ -308,7 +308,7 @@
print(obj)
self.assertTrue(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBTarget(self):
obj = lldb.SBTarget()
@@ -319,7 +319,7 @@
import sb_target
sb_target.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBThread(self):
obj = lldb.SBThread()
@@ -330,7 +330,7 @@
import sb_thread
sb_thread.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBType(self):
try:
@@ -349,7 +349,7 @@
import sb_type
sb_type.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBTypeList(self):
"""SBTypeList object is valid after default construction."""
@@ -358,7 +358,7 @@
print(obj)
self.assertTrue(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBValue(self):
obj = lldb.SBValue()
@@ -369,7 +369,7 @@
import sb_value
sb_value.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBValueList(self):
obj = lldb.SBValueList()
@@ -380,7 +380,7 @@
import sb_valuelist
sb_valuelist.fuzz_obj(obj)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_SBWatchpoint(self):
obj = lldb.SBWatchpoint()
diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
index a6a1657..e5dcc49 100644
--- a/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
+++ b/lldb/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
@@ -15,7 +15,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_disassemble_raw_data(self):
"""Test disassembling raw bytes with the API."""
diff --git a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
index 6e326b8..25f43e2 100644
--- a/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
+++ b/lldb/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
@@ -16,7 +16,7 @@
mydir = TestBase.compute_mydir(__file__)
@skipIf(True) # llvm.org/pr24575: all tests get ERRORs in dotest.py after this
- @python_api_test
+ @add_test_categories(['pyapi'])
@no_debug_info_test
def test_disassemble_invalid_vst_1_64_raw_data(self):
"""Test disassembling invalid vst1.64 raw bytes with the API."""
diff --git a/lldb/test/python_api/event/TestEvents.py b/lldb/test/python_api/event/TestEvents.py
index 6fcb67f..773c189 100644
--- a/lldb/test/python_api/event/TestEvents.py
+++ b/lldb/test/python_api/event/TestEvents.py
@@ -21,7 +21,7 @@
# Find the line number to of function 'c'.
self.line = line_number('main.c', '// Find the line number of function "c" here.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureLinux("llvm.org/pr23730") # Flaky, fails ~1/10 cases
@skipIfLinux # skip to avoid crashes
def test_listen_for_and_print_event(self):
@@ -100,7 +100,7 @@
# Wait until the 'MyListeningThread' terminates.
my_thread.join()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_wait_for_event(self):
"""Exercise SBListener.WaitForEvent() API."""
self.build()
@@ -172,7 +172,7 @@
"My listening thread successfully received an event")
@skipIfFreeBSD # llvm.org/pr21325
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFlakeyLinux("llvm.org/pr23617") # Flaky, fails ~1/10 cases
@expectedFailureWindows("llvm.org/pr24778")
def test_add_listener_to_broadcaster(self):
diff --git a/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py b/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
index 6a3be36..fbe43bc 100644
--- a/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
+++ b/lldb/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
@@ -13,7 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_formatters_api(self):
"""Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
self.build()
diff --git a/lldb/test/python_api/formatters/TestFormattersSBAPI.py b/lldb/test/python_api/formatters/TestFormattersSBAPI.py
index 7f3075f..807848f 100644
--- a/lldb/test/python_api/formatters/TestFormattersSBAPI.py
+++ b/lldb/test/python_api/formatters/TestFormattersSBAPI.py
@@ -18,7 +18,7 @@
TestBase.setUp(self)
self.line = line_number('main.cpp', '// Set break point at this line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_formatters_api(self):
"""Test Python APIs for working with formatters"""
self.build()
@@ -291,7 +291,7 @@
self.expect("frame variable e2", substrs=["I am an empty Empty2"])
self.expect("frame variable e2", substrs=["I am an empty Empty2 {}"], matching=False)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_force_synth_off(self):
"""Test that one can have the public API return non-synthetic SBValues if desired"""
self.build(dictionary={'EXE':'no_synth'})
diff --git a/lldb/test/python_api/frame/TestFrames.py b/lldb/test/python_api/frame/TestFrames.py
index d8cccc6..98f5062 100644
--- a/lldb/test/python_api/frame/TestFrames.py
+++ b/lldb/test/python_api/frame/TestFrames.py
@@ -16,7 +16,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24778")
def test_get_arg_vals_for_call_stack(self):
"""Exercise SBFrame.GetVariables() API to get argument vals."""
@@ -106,7 +106,7 @@
substrs = ["a((int)val=1, (char)ch='A')",
"a((int)val=3, (char)ch='A')"])
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_frame_api_boundary_condition(self):
"""Exercise SBFrame APIs with boundary condition inputs."""
self.build()
@@ -145,7 +145,7 @@
frame.EvaluateExpression(None)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_frame_api_IsEqual(self):
"""Exercise SBFrame API IsEqual."""
self.build()
diff --git a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
index 1fc8606..63288a8 100644
--- a/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
+++ b/lldb/test/python_api/frame/inlines/TestInlinedFrame.py
@@ -23,7 +23,7 @@
self.first_stop = line_number(self.source, '// This should correspond to the first break stop.')
self.second_stop = line_number(self.source, '// This should correspond to the second break stop.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stop_at_outer_inline(self):
"""Exercise SBFrame.IsInlined() and SBFrame.GetFunctionName()."""
self.build()
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index 7f0dce1..d66a66f 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -22,7 +22,7 @@
self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Exercise getting SBAddress objects, disassembly, and SBAddress APIs."""
self.build()
diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
index bb0a78a..1488e52 100644
--- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py
+++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
@@ -22,7 +22,7 @@
self.line1 = line_number('main.c', '// Find the line number for breakpoint 1 here.')
self.line2 = line_number('main.c', '// Find the line number for breakpoint 2 here.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24778")
def test(self):
"""Exercise some SBSymbol and SBAddress APIs."""
diff --git a/lldb/test/python_api/hello_world/TestHelloWorld.py b/lldb/test/python_api/hello_world/TestHelloWorld.py
index 5e8343e..430d4fb 100644
--- a/lldb/test/python_api/hello_world/TestHelloWorld.py
+++ b/lldb/test/python_api/hello_world/TestHelloWorld.py
@@ -29,7 +29,7 @@
# Call super's tearDown().
TestBase.tearDown(self)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_process_launch_api(self):
"""Create target, breakpoint, launch a process, and then kill it."""
self.build(dictionary=self.d)
@@ -72,7 +72,7 @@
# The breakpoint should have a hit count of 1.
self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
@expectedFailureWindows("llvm.org/pr24600")
def test_with_attach_to_process_with_id_api(self):
@@ -101,7 +101,7 @@
substrs = ['main.c:%d' % self.line2,
'(int)argc=3'])
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailurei386 # llvm.org/pr17384: lldb needs to be aware of linux-vdso.so to unwind stacks properly
@expectedFailureWindows("llvm.org/pr24600")
def test_with_attach_to_process_with_name_api(self):
diff --git a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
index 74baf11..3755bfb 100644
--- a/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
+++ b/lldb/test/python_api/interpreter/TestCommandInterpreterAPI.py
@@ -18,7 +18,7 @@
# Find the line number to break on inside main.cpp.
self.line = line_number('main.c', 'Hello world.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_process_launch_api(self):
"""Test the SBCommandInterpreter APIs."""
self.build()
diff --git a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
index 90ceed2..a9f735e 100644
--- a/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
+++ b/lldb/test/python_api/lldbutil/frame/TestFrameUtils.py
@@ -21,7 +21,7 @@
self.line = line_number('main.c',
"// Find the line number here.")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_frame_utils(self):
"""Test utility functions for the frame object."""
self.build()
diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
index c8ab813..5c4db48 100644
--- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -22,7 +22,7 @@
self.line1 = line_number('main.cpp', '// Set break point at this line.')
self.line2 = line_number('main.cpp', '// And that line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_lldb_iter_module(self):
"""Test module_iter works correctly for SBTarget -> SBModule."""
self.build()
@@ -56,7 +56,7 @@
self.assertTrue(yours[i] == mine[i],
"UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_lldb_iter_breakpoint(self):
"""Test breakpoint_iter works correctly for SBTarget -> SBBreakpoint."""
self.build()
@@ -88,7 +88,7 @@
self.assertTrue(yours[i] == mine[i],
"ID of yours[{0}] and mine[{0}] matches".format(i))
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_lldb_iter_frame(self):
"""Test iterator works correctly for SBProcess->SBThread->SBFrame."""
self.build()
diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 43b5d9d..bb098b9 100644
--- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -21,7 +21,7 @@
# Find the line number to break inside main().
self.line1 = line_number('main.cpp', '// Set break point at this line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows # Test crashes
def test_iter_registers(self):
"""Test iterator works correctly for lldbutil.iter_registers()."""
diff --git a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
index 859cbdc..f8a6533 100644
--- a/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
+++ b/lldb/test/python_api/lldbutil/process/TestPrintStackTraces.py
@@ -23,7 +23,7 @@
@expectedFailureAll("llvm.org/pr23043", ["linux"], archs=["i386"]) # We are unable to produce a backtrace of the main thread when the thread is blocked in fgets
@expectedFailureWindows("llvm.org/pr24778")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stack_traces(self):
"""Test SBprocess and SBThread APIs with printing of the stack traces."""
self.build()
diff --git a/lldb/test/python_api/module_section/TestModuleAndSection.py b/lldb/test/python_api/module_section/TestModuleAndSection.py
index c89ff22..d12f1ae 100644
--- a/lldb/test/python_api/module_section/TestModuleAndSection.py
+++ b/lldb/test/python_api/module_section/TestModuleAndSection.py
@@ -16,7 +16,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_module_and_section(self):
"""Test module and section APIs."""
self.build()
@@ -56,7 +56,7 @@
print(INDENT2 + str(sym))
print(INDENT2 + "symbol type: %s" % symbol_type_to_str(sym.GetType()))
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_module_and_section_boundary_condition(self):
"""Test module and section APIs by passing None when it expects a Python string."""
self.build()
@@ -97,7 +97,7 @@
if sec1:
sec1.FindSubSection(None)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_module_compile_unit_iter(self):
"""Test module's compile unit iterator APIs."""
self.build()
diff --git a/lldb/test/python_api/objc_type/TestObjCType.py b/lldb/test/python_api/objc_type/TestObjCType.py
index d856463..1255d6f 100644
--- a/lldb/test/python_api/objc_type/TestObjCType.py
+++ b/lldb/test/python_api/objc_type/TestObjCType.py
@@ -21,7 +21,7 @@
self.line = line_number("main.m", '// Break at this line')
@skipUnlessDarwin
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Test SBType for ObjC classes."""
self.build()
diff --git a/lldb/test/python_api/process/TestProcessAPI.py b/lldb/test/python_api/process/TestProcessAPI.py
index e75b78c..0f0d324 100644
--- a/lldb/test/python_api/process/TestProcessAPI.py
+++ b/lldb/test/python_api/process/TestProcessAPI.py
@@ -21,7 +21,7 @@
# Find the line number to break inside main().
self.line = line_number("main.cpp", "// Set break point at this line and check variable 'my_char'.")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_read_memory(self):
"""Test Python SBProcess.ReadMemory() API."""
self.build()
@@ -104,7 +104,7 @@
if my_uint32 != 12345:
self.fail("Result from SBProcess.ReadUnsignedFromMemory() does not match our expected output")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_write_memory(self):
"""Test Python SBProcess.WriteMemory() API."""
self.build()
@@ -156,7 +156,7 @@
exe=False,
startstr = 'a')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_access_my_int(self):
"""Test access 'my_int' using Python SBProcess.GetByteOrder() and other APIs."""
self.build()
@@ -246,7 +246,7 @@
for i in new_bytes:
print("byte:", i)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_remote_launch(self):
"""Test SBProcess.RemoteLaunch() API with a process not in eStateConnected, and it should fail."""
self.build()
@@ -266,7 +266,7 @@
success = process.RemoteLaunch(None, None, None, None, None, None, 0, False, error)
self.assertTrue(not success, "RemoteLaunch() should fail for process state != eStateConnected")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_num_supported_hardware_watchpoints(self):
"""Test SBProcess.GetNumSupportedHardwareWatchpoints() API with a process."""
self.build()
diff --git a/lldb/test/python_api/process/io/TestProcessIO.py b/lldb/test/python_api/process/io/TestProcessIO.py
index 162003f..2dc3f40 100644
--- a/lldb/test/python_api/process/io/TestProcessIO.py
+++ b/lldb/test/python_api/process/io/TestProcessIO.py
@@ -28,7 +28,7 @@
self.lines = ["Line 1", "Line 2", "Line 3"]
@skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stdin_by_api(self):
"""Exercise SBProcess.PutSTDIN()."""
self.build()
@@ -38,7 +38,7 @@
self.check_process_output(output, output)
@skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stdin_redirection(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDIN without specifying STDOUT or STDERR."""
self.build()
@@ -49,7 +49,7 @@
self.check_process_output(output, output)
@skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stdout_redirection(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT without specifying STDIN or STDERR."""
self.build()
@@ -61,7 +61,7 @@
self.check_process_output(output, error)
@skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stderr_redirection(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDERR without specifying STDIN or STDOUT."""
self.build()
@@ -73,7 +73,7 @@
self.check_process_output(output, error)
@skipIfWindows # stdio manipulation unsupported on Windows
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_stdout_stderr_redirection(self):
"""Exercise SBLaunchInfo::AddOpenFileAction() for STDOUT and STDERR without redirecting STDIN."""
self.build()
diff --git a/lldb/test/python_api/sbdata/TestSBData.py b/lldb/test/python_api/sbdata/TestSBData.py
index 1e8f0e3..b0c5be9 100644
--- a/lldb/test/python_api/sbdata/TestSBData.py
+++ b/lldb/test/python_api/sbdata/TestSBData.py
@@ -20,7 +20,7 @@
# Find the line number to break on inside main.cpp.
self.line = line_number('main.cpp', '// set breakpoint here')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_run_command(self):
"""Test the SBData APIs."""
self.build()
diff --git a/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py b/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
index 903eb8b..39c055b 100644
--- a/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
+++ b/lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py
@@ -13,7 +13,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24772")
def test(self):
"""Test SBValue::Persist"""
diff --git a/lldb/test/python_api/section/TestSectionAPI.py b/lldb/test/python_api/section/TestSectionAPI.py
index 8d7aef4..4d94a80 100755
--- a/lldb/test/python_api/section/TestSectionAPI.py
+++ b/lldb/test/python_api/section/TestSectionAPI.py
@@ -12,7 +12,7 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_target_byte_size(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
diff --git a/lldb/test/python_api/signals/TestSignalsAPI.py b/lldb/test/python_api/signals/TestSignalsAPI.py
index 8ddbdf3..4dc8e65 100644
--- a/lldb/test/python_api/signals/TestSignalsAPI.py
+++ b/lldb/test/python_api/signals/TestSignalsAPI.py
@@ -14,7 +14,7 @@
class SignalsAPITestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFlakeyLinux # this test fails 1/100 dosep runs
@skipIfWindows # Windows doesn't have signals
def test_ignore_signal(self):
diff --git a/lldb/test/python_api/symbol-context/TestSymbolContext.py b/lldb/test/python_api/symbol-context/TestSymbolContext.py
index 01509a9..b34960ac 100644
--- a/lldb/test/python_api/symbol-context/TestSymbolContext.py
+++ b/lldb/test/python_api/symbol-context/TestSymbolContext.py
@@ -21,7 +21,7 @@
# Find the line number to of function 'c'.
self.line = line_number('main.c', '// Find the line number of function "c" here.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24778")
def test(self):
"""Exercise SBSymbolContext API extensively."""
diff --git a/lldb/test/python_api/target/TestTargetAPI.py b/lldb/test/python_api/target/TestTargetAPI.py
index eadae1d..176581a 100644
--- a/lldb/test/python_api/target/TestTargetAPI.py
+++ b/lldb/test/python_api/target/TestTargetAPI.py
@@ -31,7 +31,7 @@
# It does not segfaults now. But for dwarf, the variable value is None if
# the inferior process does not exist yet. The radar has been updated.
#@unittest232.skip("segmentation fault -- skipping")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_find_global_variables(self):
"""Exercise SBTarget.FindGlobalVariables() API."""
d = {'EXE': 'b.out'}
@@ -39,7 +39,7 @@
self.setTearDownCleanup(dictionary=d)
self.find_global_variables('b.out')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureWindows("llvm.org/pr24778")
def test_find_functions(self):
"""Exercise SBTarget.FindFunctions() API."""
@@ -48,25 +48,25 @@
self.setTearDownCleanup(dictionary=d)
self.find_functions('b.out')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_description(self):
"""Exercise SBTarget.GetDescription() API."""
self.build()
self.get_description()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_launch_new_process_and_redirect_stdout(self):
"""Exercise SBTarget.Launch() API."""
self.build()
self.launch_new_process_and_redirect_stdout()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_resolve_symbol_context_with_address(self):
"""Exercise SBTarget.ResolveSymbolContextForAddress() API."""
self.build()
self.resolve_symbol_context_with_address()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_platform(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -75,7 +75,7 @@
platform = target.platform
self.assertTrue(platform, VALID_PLATFORM)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_data_byte_size(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -83,7 +83,7 @@
target = self.create_simple_target('b.out')
self.assertEquals(target.data_byte_size, 1)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_code_byte_size(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -91,7 +91,7 @@
target = self.create_simple_target('b.out')
self.assertEquals(target.code_byte_size, 1)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_resolve_file_address(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
@@ -114,7 +114,7 @@
self.assertIsNotNone(data_section2)
self.assertEquals(data_section.name, data_section2.name)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_read_memory(self):
d = {'EXE': 'b.out'}
self.build(dictionary=d)
diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py
index 4d8e9b4..e76bb65 100644
--- a/lldb/test/python_api/thread/TestThreadAPI.py
+++ b/lldb/test/python_api/thread/TestThreadAPI.py
@@ -15,19 +15,19 @@
mydir = TestBase.compute_mydir(__file__)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_process(self):
"""Test Python SBThread.GetProcess() API."""
self.build()
self.get_process()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_get_stop_description(self):
"""Test Python SBThread.GetStopDescription() API."""
self.build()
self.get_stop_description()
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_run_to_address(self):
"""Test Python SBThread.RunToAddress() API."""
# We build a different executable than the default build() does.
@@ -36,7 +36,7 @@
self.setTearDownCleanup(dictionary=d)
self.run_to_address(self.exe_name)
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureFreeBSD # llvm.org/pr20476
@expectedFailureWindows # Test crashes
def test_step_out_of_malloc_into_function_b(self):
@@ -47,7 +47,7 @@
self.setTearDownCleanup(dictionary=d)
self.step_out_of_malloc_into_function_b(self.exe_name)
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_step_over_3_times(self):
"""Test Python SBThread.StepOver() API."""
# We build a different executable than the default build() does.
diff --git a/lldb/test/python_api/type/TestTypeList.py b/lldb/test/python_api/type/TestTypeList.py
index 27683c1..9ea401a 100644
--- a/lldb/test/python_api/type/TestTypeList.py
+++ b/lldb/test/python_api/type/TestTypeList.py
@@ -24,7 +24,7 @@
self.source = 'main.cpp'
self.line = line_number(self.source, '// Break at this line')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Exercise SBType and SBTypeList API."""
d = {'EXE': self.exe_name}
diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py
index 2681350..d8776d5 100644
--- a/lldb/test/python_api/value/TestValueAPI.py
+++ b/lldb/test/python_api/value/TestValueAPI.py
@@ -24,7 +24,7 @@
self.line = line_number('main.c', '// Break at this line')
@expectedFailureWindows("llvm.org/pr24772")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Exercise some SBValue APIs."""
d = {'EXE': self.exe_name}
diff --git a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
index 452cc63..1b461d2 100644
--- a/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
+++ b/lldb/test/python_api/value/change_values/TestChangeValueAPI.py
@@ -26,7 +26,7 @@
self.end_line = line_number ('main.c', '// Set a breakpoint here at the end')
@expectedFailureWindows("llvm.org/pr24772")
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_change_value(self):
"""Exercise the SBValue::SetValueFromCString API."""
d = {'EXE': self.exe_name}
diff --git a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
index 4c3a9b0..3ce749f 100644
--- a/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
+++ b/lldb/test/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -24,7 +24,7 @@
# Find the line number to break at.
self.line = line_number('main.cpp', '// Break at this line')
- @python_api_test
+ @add_test_categories(['pyapi'])
def test(self):
"""Exercise SBValue API linked_list_iter."""
d = {'EXE': self.exe_name}
diff --git a/lldb/test/python_api/value_var_update/TestValueVarUpdate.py b/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
index 87e0ccd..e6d6d30 100644
--- a/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
+++ b/lldb/test/python_api/value_var_update/TestValueVarUpdate.py
@@ -20,7 +20,7 @@
self.exe = os.path.join(os.getcwd(), self.testMethodName)
self.d = {'EXE': self.testMethodName}
- @python_api_test
+ @add_test_categories(['pyapi'])
def test_with_process_launch_api(self):
"""Test SBValue::GetValueDidChange"""
self.build(dictionary=self.d)
diff --git a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
index 5554ff0..161804f 100644
--- a/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
+++ b/lldb/test/python_api/watchpoint/TestSetWatchpoint.py
@@ -23,7 +23,7 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
def test_watch_val(self):
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
index 95dad36..af72f68 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -23,7 +23,7 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
def test_set_watch_ignore_count(self):
diff --git a/lldb/test/python_api/watchpoint/TestWatchpointIter.py b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
index 4ce2c0d..031a4bf 100644
--- a/lldb/test/python_api/watchpoint/TestWatchpointIter.py
+++ b/lldb/test/python_api/watchpoint/TestWatchpointIter.py
@@ -23,7 +23,7 @@
# Find the line number to break inside main().
self.line = line_number(self.source, '// Set break point at this line.')
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
def test_watch_iter(self):
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
index 3ce2445..774288a 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -25,7 +25,7 @@
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446") # WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows
def test_watch_location(self):
diff --git a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
index 884989f..2051635 100644
--- a/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ b/lldb/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -25,7 +25,7 @@
# This is for verifying that watch location works.
self.violating_func = "do_bad_thing_with_location";
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@expectedFailureWindows("llvm.org/pr24446")
def test_watch_address(self):
@@ -88,7 +88,7 @@
# This finishes our test.
- @python_api_test
+ @add_test_categories(['pyapi'])
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
@skipIf(archs=['mips', 'mipsel', 'mips64', 'mips64el']) # No size constraint on MIPS for watches
def test_watch_address_with_invalid_watch_size(self):