Skip to content

Commit b793d67

Browse files
authored
Merge pull request #33 from dcci/repllinuxintegragain
[REPL] Test RPATH is set correctly on linux.
2 parents 849445c + d693319 commit b793d67

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

lit.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ lldb_path = lit_config.params.get(
169169
"lldb",
170170
os.path.join(package_path, "usr", "bin", "lldb"))
171171
lit_config.note("testing using 'lldb': {}".format(lldb_path))
172+
173+
repl_swift_dummy_path = lit_config.params.get(
174+
"repl_swift",
175+
os.path.join(package_path, "usr", "bin", "repl_swift"))
176+
lit_config.note("testing using 'repl_swift': {}".format(repl_swift_dummy_path))
172177

173178
# Verify they exist.
174179
if not os.path.exists(swift_path):
@@ -182,12 +187,17 @@ if not os.path.exists(lldb_path):
182187
lldb_path = subprocess.check_output(["xcrun", "--find", "lldb"]).strip()
183188
else:
184189
lit_config.fatal("lldb does not exist!")
190+
if not os.path.exists(repl_swift_dummy_path):
191+
if platform.system() == 'Linux':
192+
lit_config.fatal("repl_swift does not exist!")
185193

186194
# Define our supported substitutions.
187195
config.substitutions.append( ('%{package_path}', package_path) )
188196
config.substitutions.append( ('%{python}', sys.executable) )
189197
config.substitutions.append( ('%{not}', os.path.join(srcroot, "not")) )
190198
config.substitutions.append( ('%{lldb}', lldb_path) )
199+
if platform.system() == 'Linux':
200+
config.substitutions.append( ('%{repl_swift}', repl_swift_dummy_path) )
191201
config.substitutions.append( ('%{swift}', swift_path) )
192202
config.substitutions.append( ('%{swiftc}', swiftc_path) )
193203
config.substitutions.append( ('%{FileCheck}', filecheck_path) )
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Tests that DT_RPATH is correct for the dummy repl executable on Linux.
2+
# REQUIRES: platform=Linux
3+
# RUN: %{readelf} -d %{repl_swift} | %{FileCheck} %s
4+
# CHECK: {{.*}} {{RPATH|RUNPATH}} {{.*}}$ORIGIN/../lib/swift/linux

0 commit comments

Comments
 (0)