1"""
2This is a sanity check that verifies that test can be sklipped based on settings.
3"""
4
5
6import lldb
7from lldbsuite.test.lldbtest import *
8from lldbsuite.test.decorators import *
9
10
11class SettingSkipSanityTestCase(TestBase):
12
13  NO_DEBUG_INFO_TESTCASE = True
14
15  @skipIf(setting=('target.prefer-dynamic-value', 'no-dynamic-values'))
16  def testSkip(self):
17    """This setting is on by default"""
18    self.assertTrue(False, "This test should not run!")
19
20  @skipIf(setting=('target.prefer-dynamic-value', 'run-target'))
21  def testNoMatch(self):
22    self.assertTrue(True, "This test should run!")
23
24  @skipIf(setting=('target.i-made-this-one-up', 'true'))
25  def testNotExisting(self):
26    self.assertTrue(True, "This test should run!")
27
28  @expectedFailureAll(setting=('target.prefer-dynamic-value', 'no-dynamic-values'))
29  def testXFAIL(self):
30    self.assertTrue(False, "This test should run and fail!")
31
32  @expectedFailureAll(setting=('target.prefer-dynamic-value', 'run-target'))
33  def testNotXFAIL(self):
34    self.assertTrue(True, "This test should run and succeed!")
35
36