Skip to content

Commit 63f83c8

Browse files
committed
plutil: Add a test to check that plutil has the correct RUNPATH on Linux
1 parent 4907ae1 commit 63f83c8

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"))
@@ -215,6 +220,7 @@ config.substitutions.append( ('%{swift}', swift_path) )
215220
config.substitutions.append( ('%{swiftc}', swiftc_path) )
216221
config.substitutions.append( ('%{FileCheck}', filecheck_path) )
217222
config.substitutions.append( ('%{readelf}', readelf_path) )
223+
config.substitutions.append( ('%{swift_bin_dir}', swift_bin_dir_path) )
218224

219225
# Add substitutions for swiftpm executables.
220226
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)