diff options
author | Yang Tse <yangsita@gmail.com> | 2009-05-04 10:30:23 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-05-04 10:30:23 +0000 |
commit | ff3e574187d8a4b7968daedf23741f80c3b714e0 (patch) | |
tree | c763ad89901466e95695caf4c7fca5aa3eb9dff3 /tests/runtests.pl | |
parent | 4422f80ae7e8fbc80ea3f6f4eff3c7d7950dc82f (diff) |
David McCreedy's patch to fix test suite harness to allow test FTP server and client on different machines, providing FTP client address when running the FTP test server.
Diffstat (limited to 'tests/runtests.pl')
-rwxr-xr-x | tests/runtests.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl index 467b70670..47dfd0e28 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -943,6 +943,8 @@ sub runftpserver { my $ip=$HOSTIP; my $nameext; my $cmd; + my $addr; + my $addr_client; if($ipv6) { # if IPv6, use a different setup @@ -966,18 +968,20 @@ sub runftpserver { # start our server: my $flag=$debugprotocol?"-v ":""; $flag .= "-s \"$srcdir\" "; - my $addr; if($id) { $flag .="--id $id "; } if($ipv6) { $flag .="--ipv6 "; $addr = $HOST6IP; + $addr_client = $CLIENT6IP; } else { $addr = $HOSTIP; + $addr_client = $CLIENTIP; } - $cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\""; + $cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\" --client \"$addr_client\""; + my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0); if($ftppid <= 0 || !kill(0, $ftppid)) { |