diff --git a/lit.cfg b/lit.cfg index 2b06f1e..17f62f9 100644 --- a/lit.cfg +++ b/lit.cfg @@ -173,6 +173,11 @@ swift_path = lit_config.params.get( os.path.join(package_path, "usr", "bin", "swift")) lit_config.note("testing using 'swift': %r" % (swift_path,)) +swift_bin_dir_path = lit_config.params.get( + "swift", + os.path.join(package_path, "usr", "bin")) +lit_config.note("swift bin dir: %r" % (swift_bin_dir_path,)) + swiftc_path = lit_config.params.get( "swiftc", os.path.join(package_path, "usr", "bin", "swiftc")) @@ -226,6 +231,7 @@ config.substitutions.append( ('%{swiftc}', swiftc_path) ) config.substitutions.append( ('%{FileCheck}', filecheck_path) ) config.substitutions.append( ('%{readelf}', readelf_path) ) config.substitutions.append( ('%{sourcekit-lsp}', sourcekit_lsp_path) ) +config.substitutions.append( ('%{swift_bin_dir}', swift_bin_dir_path) ) # Add substitutions for swiftpm executables. swiftpm_build = lit_config.params.get("swiftpm-build") diff --git a/test-snapshot-binaries/test-rpath-plutil-linux.py b/test-snapshot-binaries/test-rpath-plutil-linux.py new file mode 100644 index 0000000..698c8c6 --- /dev/null +++ b/test-snapshot-binaries/test-rpath-plutil-linux.py @@ -0,0 +1,4 @@ +# Tests that RUNPATH is correct for the plutil binary on Linux +# REQUIRES: platform=Linux +# RUN: %{readelf} -d %{swift_bin_dir}/plutil | %{FileCheck} %s +# CHECK: {{.*}} RUNPATH {{.*}}:$ORIGIN/../lib/swift/linux