brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f0d4d26 Raw
33 lines · python
1"""2This is a sanity check that verifies that test can be skipped based on settings.3"""4 5import lldb6from lldbsuite.test.lldbtest import *7from lldbsuite.test.decorators import *8 9 10class SettingSkipSanityTestCase(TestBase):11    NO_DEBUG_INFO_TESTCASE = True12    CURRENT_PYTHON_VERSION = "3.0"13 14    @skipIf(py_version=(">=", CURRENT_PYTHON_VERSION))15    def testSkip(self):16        self.assertTrue(False, "This test should not run and fail (SKIPPED)")17 18    @skipIf(py_version=("<", CURRENT_PYTHON_VERSION))19    def testNoSKip(self):20        self.assertTrue(True, "This test should run and pass(PASS)")21 22    @expectedFailureAll(py_version=(">=", CURRENT_PYTHON_VERSION))23    def testXFAIL(self):24        self.assertTrue(False, "This test should expectedly fail (XFAIL)")25 26    @expectedFailureAll(py_version=("<", CURRENT_PYTHON_VERSION))27    def testNotXFAIL(self):28        self.assertTrue(True, "This test should pass (PASS)")29 30    @skipIf(setting=("target.i-made-this-one-up", "true"))31    def testNotExisting(self):32        self.assertTrue(True, "This test should run!")33