File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -165,14 +165,20 @@ def _test_xx(copy_so):
165
165
so_headers = subprocess .check_output (
166
166
["readelf" , "-d" , xx .__file__ ], universal_newlines = True
167
167
)
168
+ import pprint
169
+ pprint .pprint (so_headers )
170
+ rpaths = [
171
+ rpath
172
+ for line in so_headers .split ("\n " ) if "RPATH" in line or "RUNPATH" in line
173
+ for rpath in line .split ()[2 ][1 :- 1 ].split (":" )
174
+ ]
168
175
if not copy_so :
169
- import pprint
170
- pprint .pprint (so_headers )
176
+ pprint .pprint (rpaths )
171
177
# Linked against a library in /usr/lib{,64}
172
- assert 'RPATH' not in so_headers and 'RUNPATH' not in so_headers
178
+ assert "/usr/lib" not in rpaths and "/usr/lib64" not in rpaths
173
179
else :
174
180
# Linked against a library in /tmp
175
- assert 'RPATH' in so_headers or 'RUNPATH' in so_headers
181
+ assert "/tmp" in rpaths
176
182
# The import is the real test here
177
183
178
184
def test_solaris_enable_shared (self ):
You can’t perform that action at this time.
0 commit comments