示例#1
0
 def test_built_in_shlibs(self):
     expected_shlibs = ['/usr/lib/libSystem.B.dylib']
     parser = otool_parse.OtoolParser(LIBSVN_WC)
     actual_shlibs = parser.built_in_shlib_deps()
     expected_shlibs.sort()
     actual_shlibs.sort()
     self.assertEqual(expected_shlibs, actual_shlibs)
示例#2
0
def otool_library(lib):
    '''Runs otool on the library at lib.
  
  Returns an otool_parse.OtoolParser.
  '''
    otool_file = os.popen('otool -L "' + lib + '"')
    otool_data = otool_file.read()
    return otool_parse.OtoolParser(otool_data)
示例#3
0
 def test_third_party_shlibs(self):
     parser = otool_parse.OtoolParser(LIBSVN_WC)
     expected_shlibs = [
         '/opt/local/lib/libz.1.dylib',
         '/opt/svn/lib/libsvn_subr-1.0.dylib',
         '/opt/svn/lib/libsvn_delta-1.0.dylib',
         '/opt/svn/lib/libsvn_diff-1.0.dylib',
         '/opt/local/lib/libaprutil-1.0.dylib',
         '/opt/local/lib/libsqlite3.0.dylib',
         '/opt/local/lib/libexpat.1.dylib',
         '/opt/local/lib/libiconv.2.dylib',
         '/opt/local/lib/libapr-1.0.dylib', '/opt/local/lib/libintl.8.dylib'
     ]
     actual_shlibs = parser.third_party_shlib_deps()
     expected_shlibs.sort()
     actual_shlibs.sort()
     self.assertEqual(expected_shlibs, actual_shlibs)
示例#4
0
 def test_library_name(self):
     parser = otool_parse.OtoolParser(LIBSVN_WC)
     self.assertEqual('libsvn_wc-1.0.dylib', parser.library_name())
示例#5
0
 def test_library_path(self):
     parser = otool_parse.OtoolParser(LIBSVN_WC)
     self.assertEqual('/opt/svn/lib/libsvn_wc-1.0.dylib',
                      parser.library_path())