30 lines · python
1"""Test the lldb public C++ api when creating multiple targets simultaneously."""2 3import os4 5import lldb6from lldbsuite.test.decorators import *7from lldbsuite.test.lldbtest import *8from lldbsuite.test import lldbutil9 10 11class TestMultipleTargets(TestBase):12 NO_DEBUG_INFO_TESTCASE = True13 14 @skipIf(oslist=["linux"], archs=["arm$", "aarch64"])15 @skipIfNoSBHeaders16 @expectedFailureAll(17 oslist=["windows"], archs=["i[3-6]86", "x86_64"], bugnumber="llvm.org/pr20282"18 )19 @expectedFlakeyNetBSD20 @skipIfHostIncompatibleWithTarget21 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't27 # return exit code 0 to indicate success. We can let this exception go28 # - the test harness will recognize it as a test failure.29 subprocess.check_call([self.driver_exe, self.driver_exe])30