Skip to content

Commit c941079

Browse files
JDevliegherefelipepiovezan
authored andcommitted
[lldb] Provide an unconditional @Skip annotation for API tests (llvm#137712)
The correct way of doing this today is to use `@skipIf` with no arguments, which reads like it expects a condition. Fixes llvm#137710 (cherry picked from commit 3081ec1)
1 parent f94499f commit c941079

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,10 @@ def skipIf(
398398
)
399399

400400

401+
def skip(bugnumber=None):
402+
return _decorateTest(DecorateMode.Skip, bugnumber=bugnumber)
403+
404+
401405
def _skip_fn_for_android(reason, api_levels, archs):
402406
def impl():
403407
result = lldbplatformutil.match_android_device(

lldb/test/API/commands/expression/import-std-module/pair/TestPairFromStdModule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestCase(TestBase):
1313
# FIXME: This regressed in 69d5a6662115499198ebfa07a081e98a6ce4b915
1414
# but needs further investigation for what underlying Clang/LLDB bug can't
1515
# handle that code change.
16-
@skipIf
16+
@skip
1717
def test(self):
1818
self.build()
1919

lldb/test/API/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def setUp(self):
2828

2929
# Test hangs due to a kernel bug, see fdfeff0f in the linux kernel for details
3030
@skipIfTargetAndroid(api_levels=list(range(25 + 1)), archs=["aarch64", "arm"])
31-
@skipIf
31+
@skip
3232
def test_watched_var_should_only_hit_when_in_scope(self):
3333
"""Test that a variable watchpoint should only hit when in scope."""
3434
self.build(dictionary=self.d)

lldb/test/API/lang/objc/bitfield_ivars/TestBitfieldIvars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test(self):
4242

4343
# This test is meant to be xfailed, but running the test triggers an ASan
4444
# issue, so it must be skipped for now.
45-
@skipIf
45+
@skip
4646
def testExprWholeObject(self):
4747
self.build()
4848
lldbutil.run_to_source_breakpoint(

lldb/test/API/tools/lldb-dap/attach/TestDAP_attachByPortNum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import socket
2020

2121

22-
@skipIf
22+
@skip
2323
class TestDAP_attachByPortNum(lldbdap_testcase.DAPTestCaseBase):
2424
default_timeout = 20
2525

0 commit comments

Comments
 (0)