Commit 497ac8e3 authored by Jérome Perrin's avatar Jérome Perrin

testcase: also check non executable lib for missing rpaths

Our condition was only checking executables, which missed some non
executable libraries.

Following up on !172 (comment 96033)

/reviewed-on !180
parent a8ddfad3
Pipeline #7608 passed with stage
in 0 seconds
...@@ -209,7 +209,7 @@ def checkSoftware(slap, software_url): ...@@ -209,7 +209,7 @@ def checkSoftware(slap, software_url):
""" """
def getLddOutput(path): def getLddOutput(path):
# type: (str) -> Dict[str, str] # type: (str) -> Dict[str, str]
"""Parse ldd output on executable as `path` and returns a mapping """Parse ldd output on shared object/executable as `path` and returns a mapping
of library paths or None when library is not found, keyed by library so name. of library paths or None when library is not found, keyed by library so name.
Raises a `DynamicLibraryNotFound` if any dynamic library is not found. Raises a `DynamicLibraryNotFound` if any dynamic library is not found.
...@@ -267,7 +267,7 @@ def checkSoftware(slap, software_url): ...@@ -267,7 +267,7 @@ def checkSoftware(slap, software_url):
if any(fnmatch.fnmatch(f, ignored_pattern) if any(fnmatch.fnmatch(f, ignored_pattern)
for ignored_pattern in ignored_file_patterns): for ignored_pattern in ignored_file_patterns):
continue continue
if os.access(f, os.X_OK): if os.access(f, os.X_OK) or fnmatch.fnmatch('*.so', f):
try: try:
libs = getLddOutput(f) libs = getLddOutput(f)
except DynamicLibraryNotFound as e: except DynamicLibraryNotFound as e:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment