From 67d4db22794cd65b6e315950870b9e0fd52080d1 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Thu, 14 Jun 2012 22:19:49 +0200 Subject: [PATCH] Fixed bug #36660: --workdir mkdir does not use --sshlogin custom ssh. --- src/parallel | 2 +- testsuite/tests-to-run/parallel-local114.sh | 7 +++++++ testsuite/wanted-results/parallel-local114 | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/parallel b/src/parallel index 4ea8a34e..2ce4593e 100755 --- a/src/parallel +++ b/src/parallel @@ -3405,7 +3405,7 @@ sub sshtransfer { if(-r $file) { my $mkremote_workdir = $remote_workdir eq "." ? "true" : - "ssh $serverlogin mkdir -p $rsync_destdir"; + "$sshcmd $serverlogin mkdir -p $rsync_destdir"; $pre .= "$mkremote_workdir; rsync $rsync_opt " . ::shell_quote_scalar($file)." $serverlogin:$rsync_destdir;"; } else { diff --git a/testsuite/tests-to-run/parallel-local114.sh b/testsuite/tests-to-run/parallel-local114.sh index ba773f8b..50584368 100755 --- a/testsuite/tests-to-run/parallel-local114.sh +++ b/testsuite/tests-to-run/parallel-local114.sh @@ -28,4 +28,11 @@ seq 1 60000 | parallel -I :: -X -j1 echo a::b::c | echo "### bug #36659: --sshlogin strips leading slash from ssh command" parallel --sshlogin '/usr/bin/ssh localhost' echo ::: OK + +echo "### bug #36660: --workdir mkdir does not use --sshlogin custom ssh" + cd /tmp; echo OK > parallel_test.txt; + ssh () { echo Failed; }; + export -f ssh; + parallel --workdir /tmp/foo/bar --transfer --sshlogin '/usr/bin/ssh localhost' cat ::: parallel_test.txt; + EOF diff --git a/testsuite/wanted-results/parallel-local114 b/testsuite/wanted-results/parallel-local114 index 40e1f2d1..3bd6620d 100644 --- a/testsuite/wanted-results/parallel-local114 +++ b/testsuite/wanted-results/parallel-local114 @@ -84,3 +84,5 @@ Chars per line (697800/6): 116300 Chars per line (817788/7): 116826 ### bug #36659: --sshlogin strips leading slash from ssh command OK +### bug #36660: --workdir mkdir does not use --sshlogin custom ssh +OK