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