Skip to content

Commit 521b00d

Browse files
authored
Merge pull request swiftlang#33169 from compnerd/remote-sort
test: sort the environment for `remote-run`
2 parents 9f47a28 + 2b8d57c commit 521b00d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/remote-run/env.test-sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ RUN: env REMOTE_RUN_CHILD_FOO=foo REMOTE_RUN_CHILD_BAR=bar %debug-remote-run -v
55

66
CHECK: {{^:foo: :bar:$}}
77

8-
VERBOSE: /usr/bin/env FOO=foo BAR=bar sh -c echo ":${FOO}:" ":${BAR}:"
8+
VERBOSE: /usr/bin/env BAR=bar FOO=foo sh -c echo ":${FOO}:" ":${BAR}:"

utils/remote-run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class CommandRunner(object):
6868
self.run_sftp(sftp_commands)
6969

7070
def run_remote(self, command, remote_env={}):
71-
env_strings = ['{0}={1}'.format(k,v) for k,v in remote_env.items()]
71+
env_strings = ['{0}={1}'.format(k,v) for k,v in sorted(remote_env.items())]
7272
remote_invocation = self.remote_invocation(
7373
['/usr/bin/env'] + env_strings + command)
7474
remote_proc = self.popen(remote_invocation, stdin=subprocess.PIPE,

0 commit comments

Comments
 (0)