llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Charles Zablit (charles-zablit) <details> <summary>Changes</summary> This is a follow up to https://github.com/llvm/llvm-project/pull/212753 to convert the `lldb-dap` tests to use the `@<!-- -->require` decorators. --- Full diff: https://github.com/llvm/llvm-project/pull/213462.diff 12 Files Affected: - (modified) lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/console/TestDAP_console.py (+8-5) - (modified) lldb/test/API/tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/exception/objc/TestDAP_exception_objc.py (+3-3) - (modified) lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_win_debug_heap.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/longpath/TestDAP_launch_longPath.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/module/TestDAP_module.py (+2-2) - (modified) lldb/test/API/tools/lldb-dap/server/TestDAP_server.py (+1-1) - (modified) lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py (+3-3) ``````````diff diff --git a/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py index 96c5b193df39f..f2a7e4819e644 100644 --- a/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py +++ b/lldb/test/API/tools/lldb-dap/attach/TestDAP_attach.py @@ -10,8 +10,8 @@ from lldbsuite.test.decorators import ( expectedFailureWindows, expectedFailureWindowsAndNoLLDBServer, + requireNotWasm, skipIf, - skipIfWasm, skipIfWindowsAndLLDBServer, ) from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase @@ -25,7 +25,7 @@ # Often fails on Arm Linux, but not specifically because it's Arm, something in # process scheduling can cause a massive (minutes) delay during this test. @skipIf(oslist=["linux"], archs=["arm$"]) -@skipIfWasm # No attach support +@requireNotWasm # No attach support class TestDAP_attach(DAPTestCaseBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py b/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py index 11e8cf5e8f692..5233bf4c6c5f8 100644 --- a/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py +++ b/lldb/test/API/tools/lldb-dap/console/TestDAP_console.py @@ -6,15 +6,18 @@ import os import unittest -from lldbsuite.test.decorators import skipIfWindows +from lldbsuite.test.decorators import requireNotWindows from lldbsuite.test.lldbtest import line_number from lldbsuite.test.tools.lldb_dap.types import LaunchArgs from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase, DAPTestSession +from lldbsuite.test.skip_reason import UnsupportedReason -skipUnlessPsutil = unittest.skipUnless( +requirePsutil = unittest.skipUnless( importlib.util.find_spec("psutil") is not None, - "psutil not installed, please install using 'pip install psutil'.", + UnsupportedReason( + "psutil not installed, please install using 'pip install psutil'." + ), ) @@ -113,8 +116,8 @@ def test_custom_escape_prefix(self): def test_empty_escape_prefix(self): self.do_test_with_escape_prefix("") - @skipIfWindows - @skipUnlessPsutil + @requireNotWindows + @requirePsutil def test_exit_status_message_sigterm(self): import psutil diff --git a/lldb/test/API/tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py b/lldb/test/API/tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py index b26618df7800c..b2b643222146c 100644 --- a/lldb/test/API/tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py +++ b/lldb/test/API/tools/lldb-dap/databreakpoint/TestDAP_setDataBreakpoints.py @@ -7,7 +7,7 @@ import lldbdap_testcase -@skipIfWasm # data breakpoints map to watchpoints +@requireNotWasm # data breakpoints map to watchpoints class TestDAP_setDataBreakpoints(lldbdap_testcase.DAPTestCaseBase): def setUp(self): lldbdap_testcase.DAPTestCaseBase.setUp(self) diff --git a/lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py b/lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py index 972c0fa46df06..537d4e399b06c 100644 --- a/lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py +++ b/lldb/test/API/tools/lldb-dap/disconnect/TestDAP_disconnect.py @@ -11,7 +11,7 @@ import os -@skipIfWasm # no attach support +@requireNotWasm # no attach support class TestDAP_disconnect(lldbdap_testcase.DAPTestCaseBase): SHARED_BUILD_TESTCASE = False diff --git a/lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py b/lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py index 23e8763cf8d81..9170118e2f309 100644 --- a/lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py +++ b/lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py @@ -3,11 +3,11 @@ """ from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase -from lldbsuite.test.decorators import skipIfNoSignals +from lldbsuite.test.decorators import requireSignals from lldbsuite.test.tools.lldb_dap.types import LaunchArgs -@skipIfNoSignals +@requireSignals class TestDAP_exception(DAPTestCaseBase): def test_stopped_description(self): """ diff --git a/lldb/test/API/tools/lldb-dap/exception/objc/TestDAP_exception_objc.py b/lldb/test/API/tools/lldb-dap/exception/objc/TestDAP_exception_objc.py index 5d56744dc77fe..5fd50882b0978 100644 --- a/lldb/test/API/tools/lldb-dap/exception/objc/TestDAP_exception_objc.py +++ b/lldb/test/API/tools/lldb-dap/exception/objc/TestDAP_exception_objc.py @@ -2,13 +2,13 @@ Test exception behavior in DAP with obj-c throw. """ -from lldbsuite.test.decorators import skipUnlessDarwin +from lldbsuite.test.decorators import requireDarwin from lldbsuite.test.tools.lldb_dap.types import ExceptionFilterOptions, LaunchArgs from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase class TestDAP_exception_objc(DAPTestCaseBase): - @skipUnlessDarwin + @requireDarwin def test_stopped_description(self): """ Test that exception description is shown correctly in stopped event. @@ -34,7 +34,7 @@ def test_stopped_description(self): stack_trace = self.expect_not_none(exception_details.stackTrace) self.assertRegex(stack_trace, "main.m") - @skipUnlessDarwin + @requireDarwin def test_break_on_throw_and_catch(self): """ Test that breakpoints on exceptions work as expected. diff --git a/lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py b/lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py index 33a3bde3a5a42..ea065bc79df53 100644 --- a/lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py +++ b/lldb/test/API/tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py @@ -42,7 +42,7 @@ def build_and_run(self, displayExtendedBacktrace=True): len(breakpoint_ids), len(lines), "expect correct number of breakpoints" ) - @skipUnlessDarwin + @requireDarwin def test_stackTrace(self): """ Tests the 'stackTrace' packet on a thread with an extended backtrace. @@ -104,7 +104,7 @@ def test_stackTrace(self): totalFrames, i, "total frames should include a pagination offset" ) - @skipUnlessDarwin + @requireDarwin def test_stackTraceWithFormat(self): """ Tests the 'stackTrace' packet on a thread with an extended backtrace using stack trace formats. diff --git a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_win_debug_heap.py b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_win_debug_heap.py index 5bd2dc10f6590..e6298b66b57aa 100644 --- a/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_win_debug_heap.py +++ b/lldb/test/API/tools/lldb-dap/launch/TestDAP_launch_win_debug_heap.py @@ -2,14 +2,14 @@ Test lldb-dap launch request. """ -from lldbsuite.test.decorators import skipUnlessWindows, skipIfBuildType +from lldbsuite.test.decorators import requireWindows, skipIfBuildType from lldbsuite.test.tools.lldb_dap.types import LaunchArgs, Console from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase from typing import List @skipIfBuildType(["debug"]) -@skipUnlessWindows +@requireWindows class TestDAP_launch_win_debug_heap(DAPTestCaseBase): """ Test that lldb-dap respects the debug heap setting on Windows when launching in an integrated terminal. diff --git a/lldb/test/API/tools/lldb-dap/longpath/TestDAP_launch_longPath.py b/lldb/test/API/tools/lldb-dap/longpath/TestDAP_launch_longPath.py index 94221a99653cc..0e74d479be9df 100644 --- a/lldb/test/API/tools/lldb-dap/longpath/TestDAP_launch_longPath.py +++ b/lldb/test/API/tools/lldb-dap/longpath/TestDAP_launch_longPath.py @@ -7,14 +7,14 @@ import shutil from lldbsuite.test import lldbutil -from lldbsuite.test.decorators import skipUnlessWindows +from lldbsuite.test.decorators import requireWindows from lldbsuite.test.tools.lldb_dap import DAPTestCaseBase from lldbsuite.test.tools.lldb_dap.types import ExitedEvent, LaunchArgs, TerminatedEvent MAX_PATH = 260 -@skipUnlessWindows +@requireWindows class TestDAP_launch_longPath(DAPTestCaseBase): def _long_path(self, path): return lldbutil.get_extended_windows_path(path) diff --git a/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py b/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py index 8e2a7bf001b93..167ed9f494547 100644 --- a/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py +++ b/lldb/test/API/tools/lldb-dap/module/TestDAP_module.py @@ -5,7 +5,7 @@ import platform import re -from lldbsuite.test.decorators import skipIfWindows, skipUnlessDarwin +from lldbsuite.test.decorators import requireDarwin, skipIfWindows from lldbsuite.test.lldbtest import line_number from lldbsuite.test.tools.lldb_dap.types import ( CompileUnitsArgs, @@ -107,7 +107,7 @@ def test_modules(self): "a.out", expect_debug_info_size=platform.system() != "Darwin" ) - @skipUnlessDarwin + @requireDarwin def test_modules_dsym(self): """ Darwin only test with dSYM file. diff --git a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py index 1cbda50e07dd5..e3c73b75d83ac 100644 --- a/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py +++ b/lldb/test/API/tools/lldb-dap/server/TestDAP_server.py @@ -74,7 +74,7 @@ def test_server_port(self): self.run_debug_session(connection, "Alice") self.run_debug_session(connection, "Bob") - @skipIfWindows + @requirePOSIX def test_server_unix_socket(self): """ Test launching a binary with a lldb-dap in server mode on a unix socket. diff --git a/lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py b/lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py index 1615939b02364..294b1d1560345 100644 --- a/lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py +++ b/lldb/test/API/tools/lldb-dap/variables/TestDAP_variables.py @@ -8,9 +8,9 @@ from lldbsuite.test import lldbplatformutil from lldbsuite.test.decorators import ( no_debug_info_test, + requireDarwin, skipIfAsan, skipIfWindows, - skipUnlessDarwin, ) from lldbsuite.test.lldbtest import line_number from lldbsuite.test.tools.lldb_dap.types import ( @@ -724,7 +724,7 @@ def test_registers(self): self.assertIn("at main.cpp:", pc_reg.value) @no_debug_info_test - @skipUnlessDarwin + @requireDarwin def test_darwin_dwarf_missing_obj(self): """ Test that if we build a binary with DWARF in .o files and we remove @@ -738,7 +738,7 @@ def test_darwin_dwarf_missing_obj(self): self.darwin_dwarf_missing_obj(None) @no_debug_info_test - @skipUnlessDarwin + @requireDarwin def test_darwin_dwarf_missing_obj_with_symbol_ondemand_enabled(self): """ Test that if we build a binary with DWARF in .o files and we remove `````````` </details> https://github.com/llvm/llvm-project/pull/213462 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
