1"""Test the lldb public C++ api for returning SBCommandReturnObject.""" 2 3from __future__ import print_function 4 5 6from lldbsuite.test.decorators import * 7from lldbsuite.test.lldbtest import * 8from lldbsuite.test import lldbutil 9 10 11class TestSBCommandReturnObject(TestBase): 12 NO_DEBUG_INFO_TESTCASE = True 13 14 @skipIfNoSBHeaders 15 @expectedFailureAll( 16 oslist=["windows"], archs=["i[3-6]86", "x86_64"], 17 bugnumber="llvm.org/pr43570") 18 def test_sb_command_return_object(self): 19 env = {self.dylibPath: self.getLLDBLibraryEnvVal()} 20 21 self.driver_exe = self.getBuildArtifact("command-return-object") 22 self.buildDriver('main.cpp', self.driver_exe) 23 self.addTearDownHook(lambda: os.remove(self.driver_exe)) 24 self.signBinary(self.driver_exe) 25 26 if self.TraceOn(): 27 print("Running test %s" % self.driver_exe) 28 check_call([self.driver_exe, self.driver_exe], env=env) 29 else: 30 with open(os.devnull, 'w') as fnull: 31 check_call([self.driver_exe, self.driver_exe], 32 env=env, stdout=fnull, stderr=fnull) 33