Skip to content

Commit bb7b185

Browse files
committed
plutil: Add a test to check that plutil has the correct RUNPATH on Linux
1 parent 11f0f6e commit bb7b185

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lit.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ swift_path = lit_config.params.get(
173173
os.path.join(package_path, "usr", "bin", "swift"))
174174
lit_config.note("testing using 'swift': %r" % (swift_path,))
175175

176+
swift_bin_dir_path = lit_config.params.get(
177+
"swift",
178+
os.path.join(package_path, "usr", "bin"))
179+
lit_config.note("swift bin dir: %r" % (swift_bin_dir_path,))
180+
176181
swiftc_path = lit_config.params.get(
177182
"swiftc",
178183
os.path.join(package_path, "usr", "bin", "swiftc"))
@@ -226,6 +231,7 @@ config.substitutions.append( ('%{swiftc}', swiftc_path) )
226231
config.substitutions.append( ('%{FileCheck}', filecheck_path) )
227232
config.substitutions.append( ('%{readelf}', readelf_path) )
228233
config.substitutions.append( ('%{sourcekit-lsp}', sourcekit_lsp_path) )
234+
config.substitutions.append( ('%{swift_bin_dir}', swift_bin_dir_path) )
229235

230236
# Add substitutions for swiftpm executables.
231237
swiftpm_build = lit_config.params.get("swiftpm-build")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Tests that RUNPATH is correct for the plutil binary on Linux
2+
# REQUIRES: platform=Linux
3+
# RUN: %{readelf} -d %{swift_bin_dir}/plutil | %{FileCheck} %s
4+
# CHECK: {{.*}} RUNPATH {{.*}}:$ORIGIN/../lib/swift/linux

0 commit comments

Comments
 (0)