1 from __future__ import print_function
5 from lldbsuite.test.lldbtest import *
6 import lldbsuite.test.lldbutil as lldbutil
7 from lldbsuite.test.decorators import *
9 class TestPreRunLibraries(TestBase):
11 mydir = TestBase.compute_mydir(__file__)
12 NO_DEBUG_INFO_TESTCASE = True
15 # Call super's setUp().
18 @skipIf(oslist=no_match(['darwin','macos']))
20 """Test that we find directly linked dylib pre-run."""
23 target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
24 self.assertTrue(target, VALID_TARGET)
26 # I don't know what the name of a shared library
27 # extension is in general, so instead of using FindModule,
28 # I'll iterate through the module and do a basename match.
30 for module in target.modules:
31 file_name = module.GetFileSpec().GetFilename()
32 if file_name.find("unlikely_name") != -1:
36 self.assertTrue(found_it, "Couldn't find unlikely_to_occur_name in loaded libraries.")