1 """Test the lldb public C++ api when creating multiple targets simultaneously."""
6 from lldbsuite
.test
.decorators
import *
7 from lldbsuite
.test
.lldbtest
import *
8 from lldbsuite
.test
import lldbutil
11 class TestMultipleTargets(TestBase
):
12 NO_DEBUG_INFO_TESTCASE
= True
14 @skipIf(oslist
=["linux"], archs
=["arm", "aarch64"])
16 @skipIfHostIncompatibleWithRemote
18 oslist
=["windows"], archs
=["i[3-6]86", "x86_64"], bugnumber
="llvm.org/pr20282"
21 def test_multiple_targets(self
):
22 env
= {self
.dylibPath
: self
.getLLDBLibraryEnvVal()}
24 self
.driver_exe
= self
.getBuildArtifact("multi-target")
25 self
.buildDriver("main.cpp", self
.driver_exe
)
26 self
.addTearDownHook(lambda: os
.remove(self
.driver_exe
))
27 self
.signBinary(self
.driver_exe
)
29 # check_call will raise a CalledProcessError if multi-process-driver doesn't return
30 # exit code 0 to indicate success. We can let this exception go - the test harness
31 # will recognize it as a test failure.
34 print("Running test %s" % self
.driver_exe
)
35 check_call([self
.driver_exe
, self
.driver_exe
], env
=env
)
37 with
open(os
.devnull
, "w") as fnull
:
39 [self
.driver_exe
, self
.driver_exe
],