Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / api / multiple-targets / TestMultipleTargets.py
blob831ce325bcdb52ed7435590e2db97065ba3177d8
1 """Test the lldb public C++ api when creating multiple targets simultaneously."""
3 import os
5 import lldb
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"])
15 @skipIfNoSBHeaders
16 @skipIfHostIncompatibleWithRemote
17 @expectedFailureAll(
18 oslist=["windows"], archs=["i[3-6]86", "x86_64"], bugnumber="llvm.org/pr20282"
20 @expectedFlakeyNetBSD
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.
33 if self.TraceOn():
34 print("Running test %s" % self.driver_exe)
35 check_call([self.driver_exe, self.driver_exe], env=env)
36 else:
37 with open(os.devnull, "w") as fnull:
38 check_call(
39 [self.driver_exe, self.driver_exe],
40 env=env,
41 stdout=fnull,
42 stderr=fnull,