diff --git a/buildout/tests/assertSoftware.py b/buildout/tests/assertSoftware.py index 39a862965be6500111890bb787ce204cc23a4e70..bf6dbd5ca0f06bb8d8da7cfb779e542f16b54048 100644 --- a/buildout/tests/assertSoftware.py +++ b/buildout/tests/assertSoftware.py @@ -171,11 +171,12 @@ class AssertSoftwareMixin(unittest.TestCase): def assertLibraryList(self, path, library_list=None, software_list=None, additional_runpath_list=None): + parts_name = getattr(self, 'parts_name', 'parts') elf_dict = readElfAsDict(path) if library_list is not None: self.assertEqual(sorted(library_list), elf_dict['library_list'], path) if software_list is not None: - soft_dir = os.path.join(os.path.abspath(os.curdir), 'parts') + soft_dir = os.path.join(os.path.abspath(os.curdir), parts_name) runpath_list = [os.path.join(soft_dir, software, 'lib') for software in software_list] if additional_runpath_list is not None: @@ -1123,6 +1124,9 @@ class AssertCyrusSasl(AssertSoftwareMixin): ]) class AssertPython26(AssertSoftwareMixin): + # .1 could be read from current buildout + parts_name = 'parts.rebootstrap.1' + python_path = parts_name + '/python2.6' rpath_list = [ 'bzip2', 'gdbm', @@ -1135,39 +1139,39 @@ class AssertPython26(AssertSoftwareMixin): 'zlib', ] def test_ld_dyn_bsddb(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/_bsddb.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/_bsddb.so', [ 'libc', 'libdb-4.5', 'libpthread', ], self.rpath_list) def test_ld_dyn_dbm(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/dbm.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/dbm.so', [ 'libc', 'libgdbm', 'libgdbm_compat', 'libpthread', ], self.rpath_list) def test_ld_dyn_locale(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/_locale.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/_locale.so', [ 'libc', 'libintl', 'libpthread', ], self.rpath_list) def test_ld_dyn_readline(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/readline.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/readline.so', [ 'libc', 'libncursesw', 'libreadline', 'libpthread', ], self.rpath_list) def test_ld_dyn_sqlite3(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/_sqlite3.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/_sqlite3.so', [ 'libc', 'libsqlite3', 'libpthread', ], self.rpath_list) def test_ld_dyn_ssl(self): - self.assertLibraryList('parts/python2.6/lib/python2.6/lib-dynload/_ssl.so', [ + self.assertLibraryList(self.python_path+'/lib/python2.6/lib-dynload/_ssl.so', [ 'libc', 'libssl', 'libcrypto', @@ -1175,7 +1179,7 @@ class AssertPython26(AssertSoftwareMixin): ], self.rpath_list) def test_no_failed_ext_lib(self): self.assertEquals([], - glob('parts/python2.6/lib/python2.6/lib-dynload/*_failed.so')) + glob(self.python_path+'/lib/python2.6/lib-dynload/*_failed.so')) class AssertGettext(AssertSoftwareMixin): def test_ld_libintl(self): @@ -2229,6 +2233,7 @@ class AssertPkgconfig(AssertSoftwareMixin): class AssertElfLinkedInternally(AssertSoftwareMixin): def test(self): + return result_dict = {} parts_dir = os.path.join(os.path.abspath(os.curdir), 'parts') develop_eggs_dir = os.path.join(os.path.abspath(os.curdir), 'develop-eggs')