diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-07-25 14:43:17 +0200 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-08-08 13:02:29 +0200 |
commit | aa4c811c0c1444c5073bdd37601144d74f5d979e (patch) | |
tree | a55efc5e714f8553ff90a05f21c76955ee775763 /test/test_cerbero_tools_osxuniversalgenerator.py | |
parent | 9a8b8487d0d142e39152a928322532106be09a63 (diff) |
osxuniversalgenerator: relocate properly universal objects
Diffstat (limited to 'test/test_cerbero_tools_osxuniversalgenerator.py')
-rw-r--r-- | test/test_cerbero_tools_osxuniversalgenerator.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/test_cerbero_tools_osxuniversalgenerator.py b/test/test_cerbero_tools_osxuniversalgenerator.py index b33ba977..4fc74637 100644 --- a/test/test_cerbero_tools_osxuniversalgenerator.py +++ b/test/test_cerbero_tools_osxuniversalgenerator.py @@ -24,6 +24,7 @@ import os from cerbero.config import Architecture from cerbero.utils import shell from cerbero.tools.osxuniversalgenerator import OSXUniversalGenerator +from cerbero.tools.osxrelocator import OSXRelocator TEST_APP = '''\ @@ -172,3 +173,25 @@ class OSXUniversalGeneratorTest(unittest.TestCase): pc_file = os.path.join(self.tmp, Architecture.UNIVERSAL, 'test.pc') self.assertEquals(open(pc_file).readline(), os.path.join(self.tmp, Architecture.UNIVERSAL, 'lib', 'test')) + + def testMergedLibraryPaths(self): + def check_prefix(path): + if self.tmp not in path: + return + self.assertTrue(uni_prefix in path) + self.assertTrue(x86_prefix not in path) + self.assertTrue(x86_64_prefix not in path) + + self._compile(Architecture.X86) + self._compile(Architecture.X86_64) + self._check_compiled_files() + uni_prefix = os.path.join(self.tmp, Architecture.UNIVERSAL) + x86_prefix = os.path.join(self.tmp, Architecture.X86) + x86_64_prefix = os.path.join(self.tmp, Architecture.X86_64) + gen = OSXUniversalGenerator(uni_prefix) + gen.merge_dirs([x86_prefix, x86_64_prefix]) + libfoo = os.path.join(self.tmp, Architecture.UNIVERSAL, 'lib', 'libfoo.so') + libname = OSXRelocator.library_id_name(libfoo) + check_prefix(libname) + for p in OSXRelocator.list_shared_libraries(libfoo): + check_prefix(p) |