From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 3/8] cr-publish-flight-logs: Refactor copydir args
Date: Wed, 11 Jul 2018 15:14:15 +0100 [thread overview]
Message-ID: <1531318460-4509-4-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1531318460-4509-1-git-send-email-ian.jackson@eu.citrix.com>
Have it take $cfgbase and $subdir instead. This allows us to lift the
config test into it. And it will be even more useful in a moment.
No functional change.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
cr-publish-flight-logs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cr-publish-flight-logs b/cr-publish-flight-logs
index 1e5a49d..539318d 100755
--- a/cr-publish-flight-logs
+++ b/cr-publish-flight-logs
@@ -57,7 +57,10 @@ if ($push_harness) {
}
sub copydir ($$) {
- my ($src,$dst) = @_;
+ my ($cfgbase,$subdir) = @_;
+ return unless $c{"${cfgbase}Publish"};
+ my $src = $c{$cfgbase}.$subdir."/";
+ my $dst = $c{"${cfgbase}Publish"}.$subdir;
my @cmd= qw(rsync --compress --compress-level=9 --stats --delete -auH);
push @cmd, '-e', 'ssh -o batchmode=yes';
#--bwlimit=50
@@ -66,6 +69,5 @@ sub copydir ($$) {
$!=0; $?=0; system @cmd; die "rsync $? $!" if $? or $!;
}
-copydir("$c{Logs}/$flight/", "$c{LogsPublish}/$flight")
- if $flight && $c{LogsPublish};
-copydir("$c{Results}/", "$c{ResultsPublish}") if $c{ResultsPublish};
+copydir(qw(Logs), "/$flight") if $flight;
+copydir(qw(Results), '');
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-07-11 14:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-11 14:14 [OSSTEST PATCH 0/8] Log publication from Citrix Cambridge Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 1/8] cr-ensure-disk-space: With -D, print check_space command Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 2/8] Publish: Default LogsPublish and ResultsPublish from Publish Ian Jackson
2018-07-11 14:14 ` Ian Jackson [this message]
2018-07-11 14:14 ` [OSSTEST PATCH 4/8] cr-publish-flight-logs: Refactor rsync -e option construction Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 5/8] Publish: Introduce publish_ssh_opts Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 6/8] Publish: Introduce {Logs, Results}PublishSshOpts Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 7/8] Publish: Cambridge: Publish to new public host Ian Jackson
2018-07-11 14:14 ` [OSSTEST PATCH 8/8] Publish: Cambridge: Get the public URL right Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531318460-4509-4-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).