Skip to content

Commit 5da8323

Browse files
author
Joe Shajrawi
authored
Merge pull request #19138 from apple/revert-19130-run-remote-run
Revert "[test] Yet more tweaks to remote-run"
2 parents 6f3b618 + 1377722 commit 5da8323

File tree

4 files changed

+3
-22
lines changed

4 files changed

+3
-22
lines changed

test/remote-run/custom-options.test-sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ RUN: %utils/remote-run -n --remote-dir /xyz-REMOTE -o FIRST_OPT -o SECOND_OPT --
33
CHECK: /usr/bin/ssh -n
44
CHECK-DAG: -p 12345
55
CHECK-DAG: -o FIRST_OPT -o SECOND_OPT
6-
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/rm' '-rf' '{{.+}}-REMOTE/output'
7-
8-
CHECK-NEXT: /usr/bin/ssh -n
9-
CHECK-DAG: -p 12345
10-
CHECK-DAG: -o FIRST_OPT -o SECOND_OPT
116
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/mkdir' '-p' '{{.+}}-REMOTE/output/nested'
127

138
CHECK-NEXT: /usr/bin/sftp

test/remote-run/identity.test-sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ RUN: %utils/remote-run -n --remote-dir /xyz-REMOTE -i spiderman --output-prefix
33
CHECK: /usr/bin/ssh -n
44
CHECK-DAG: -p 12345
55
CHECK-DAG: -i spiderman
6-
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/rm' '-rf' '{{.+}}-REMOTE/output'
7-
8-
CHECK-NEXT: /usr/bin/ssh -n
9-
CHECK-DAG: -p 12345
10-
CHECK-DAG: -i spiderman
116
CHECK-SAME: some_user@some_host -- '/usr/bin/env' '/bin/mkdir' '-p' '{{.+}}-REMOTE/output/nested'
127

138
CHECK-NEXT: /usr/bin/sftp

utils/remote-run

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CommandRunner(object):
2828

2929
@staticmethod
3030
def _dirnames(files):
31-
return sorted(set(os.path.dirname(f) for f in files))
31+
return list(set(os.path.dirname(f) for f in files))
3232

3333
def popen(self, command, **kwargs):
3434
if self.verbose:
@@ -195,32 +195,23 @@ def main():
195195
runner.dry_run = args.dry_run
196196
runner.verbose = args.verbose or args.dry_run
197197

198-
assert not args.remote_dir == '/'
199-
200198
upload_files = dict()
201199
download_files = dict()
202-
remote_test_specific_dir = None
203200
if args.input_prefix:
204-
assert not args.remote_input_prefix.startswith("..")
205201
remote_dir = os.path.join(args.remote_dir, args.remote_input_prefix)
206202
input_files = find_transfers(args.command, args.input_prefix,
207203
remote_dir)
208204
assert not any(upload_files.has_key(f) for f in input_files)
209205
upload_files.update(input_files)
210206
if args.output_prefix:
211-
assert not args.remote_output_prefix.startswith("..")
212207
remote_dir = os.path.join(args.remote_dir, args.remote_output_prefix)
213208
test_files = find_transfers(args.command, args.output_prefix,
214209
remote_dir)
215210
assert not any(upload_files.has_key(f) for f in test_files)
216211
upload_files.update(test_files)
217212
assert not any(download_files.has_key(f) for f in test_files)
218213
download_files.update(test_files)
219-
remote_test_specific_dir = remote_dir
220214

221-
if remote_test_specific_dir:
222-
assert remote_test_specific_dir.startswith(args.remote_dir)
223-
runner.run_remote(['/bin/rm', '-rf', remote_test_specific_dir])
224215
if upload_files:
225216
runner.send(upload_files)
226217

validation-test/Reflection/lit.local.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
config.substitutions = list(config.substitutions)
33

44
config.substitutions.insert(0, ("%target-run-reflection-test",
5-
# Copy %target-swift-reflection-test into %t to convince %target-run to copy
5+
# Link %target-swift-reflection-test into %t to convince %target-run to copy
66
# it, then use DYLD_LIBRARY_PATH to make sure it can find SwiftRemoteMirrors
77
# from its new location when /not/ run remotely.
8-
("cp %target-swift-reflection-test %t/swift-reflection-test && "
8+
("ln %target-swift-reflection-test %t/swift-reflection-test && "
99
"env %env-DYLD_LIBRARY_PATH=%platform-module-dir/../ %target-run "
1010
" %t/swift-reflection-test")))

0 commit comments

Comments
 (0)