def test_elf_paths(): out = get_relative_rpaths('/usr/bin/test', '/usr', ('/usr/lib', '/usr/lib64', '/opt/local/lib')) assert out == ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib'] out = substitute_rpath(('/usr/lib', '/usr/lib64', '/opt/local/lib'), '/usr', '/opt') assert out == ['/opt/lib', '/opt/lib64', '/opt/local/lib']
def test_elf_paths(): out = get_relative_rpaths( '/usr/bin/test', '/usr', ('/usr/lib', '/usr/lib64', '/opt/local/lib')) assert out == ['$ORIGIN/../lib', '$ORIGIN/../lib64', '/opt/local/lib'] out = substitute_rpath( ('/usr/lib', '/usr/lib64', '/opt/local/lib'), '/usr', '/opt') assert out == ['/opt/lib', '/opt/lib64', '/opt/local/lib']