1"""Test the lldb public C++ api for returning SBCommandReturnObject.""" 2 3import subprocess 4 5from lldbsuite.test.decorators import * 6from lldbsuite.test.lldbtest import * 7from lldbsuite.test import lldbutil 8 9 10class TestSBCommandReturnObject(TestBase): 11 NO_DEBUG_INFO_TESTCASE = True 12 13 @skipIfNoSBHeaders 14 @expectedFailureAll( 15 oslist=["windows"], archs=["i[3-6]86", "x86_64"], bugnumber="llvm.org/pr43570" 16 ) 17 @skipIfHostIncompatibleWithTarget 18 def test_sb_command_return_object(self): 19 self.driver_exe = self.getBuildArtifact("command-return-object") 20 self.buildDriver("main.cpp", self.driver_exe) 21 self.addTearDownHook(lambda: os.remove(self.driver_exe)) 22 23 # check_call will raise a CalledProcessError if the executable doesn't 24 # return exit code 0 to indicate success. We can let this exception go 25 # - the test harness will recognize it as a test failure. 26 subprocess.check_call([self.driver_exe, self.driver_exe]) 27