[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 5/8] Publish: Introduce publish_ssh_opts
We need to pass it $cfgbase because this will soon be configurable. No functional change right now. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- Osstest/Management.pm | 10 ++++++++-- cr-publish-flight-logs | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Osstest/Management.pm b/Osstest/Management.pm index 2c875a7..c1ed2ac 100644 --- a/Osstest/Management.pm +++ b/Osstest/Management.pm @@ -27,7 +27,7 @@ BEGIN { our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); - @EXPORT = qw( + @EXPORT = qw(publish_ssh_opts ); %EXPORT_TAGS = ( 'logs' => [qw(logs_select onloghost logcfg @@ -40,7 +40,12 @@ BEGIN { } our ($logcfgbase, $loghost, $logdir); -our @logsshopts= qw(-o batchmode=yes); +our @logsshopts; + +sub publish_ssh_opts ($) { + my ($cfgbase) = @_; # LogsPublish or ResultsPublish + return (qw(-o batchmode=yes)); +} sub logs_select ($) { ($logcfgbase) = @_; @@ -48,6 +53,7 @@ sub logs_select ($) { return 0 unless $cfgvalue; if ($cfgvalue =~ m/\:/) { ($loghost, $logdir) = ($`,$'); #'); + @logsshopts = publish_ssh_opts($logcfgbase); } else { ($loghost, $logdir) = (undef, $cfgvalue); } diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs index 9e13652..7249d03 100755 --- a/cr-publish-flight-logs +++ b/cr-publish-flight-logs @@ -21,6 +21,7 @@ use strict qw(refs vars); use Fcntl qw(:flock); BEGIN { unshift @INC, qw(.); } use Osstest; +use Osstest::Management; our %c; @@ -61,7 +62,7 @@ sub copydir ($$) { return unless $c{"${cfgbase}Publish"}; my $src = $c{$cfgbase}.$subdir."/"; my $dst = $c{"${cfgbase}Publish"}.$subdir; - my @ssh = qw(ssh -o batchmode=yes); + my @ssh = (qw(ssh), publish_ssh_opts("${cfgbase}Publish")); my @cmd= qw(rsync --compress --compress-level=9 --stats --delete -auH); push @cmd, '-e', join(' ', map { s/\'/''/g; "'$_'"; } @ssh); #--bwlimit=50 -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |