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 mydir = TestBase.compute_mydir(__file__) 14 15 NO_DEBUG_INFO_TESTCASE = True 16 17 @skipIf(setting=('target.prefer-dynamic-value', 'no-dynamic-values')) 18 def testSkip(self): 19 """This setting is on by default""" 20 self.assertTrue(False, "This test should not run!") 21 22 @skipIf(setting=('target.prefer-dynamic-value', 'run-target')) 23 def testNoMatch(self): 24 self.assertTrue(True, "This test should run!") 25 26 @skipIf(setting=('target.i-made-this-one-up', 'true')) 27 def testNotExisting(self): 28 self.assertTrue(True, "This test should run!") 29 30 @expectedFailureAll(setting=('target.prefer-dynamic-value', 'no-dynamic-values')) 31 def testXFAIL(self): 32 self.assertTrue(False, "This test should run and fail!") 33 34 @expectedFailureAll(setting=('target.prefer-dynamic-value', 'run-target')) 35 def testNotXFAIL(self): 36 self.assertTrue(True, "This test should run and succeed!") 37 38