From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST v2 2/3] TestSupport: Add interface to compress stash files
Date: Thu, 31 Oct 2013 16:53:14 +0000 [thread overview]
Message-ID: <1383238395-14161-2-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1383238365.5436.2.camel@dagon.hellion.org.uk>
Use it in ts-logs-capture
---
Osstest/TestSupport.pm | 8 +++++++-
ts-logs-capture | 5 +----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index f4ec055..dba5cef 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -66,7 +66,7 @@ BEGIN {
serial_fetch_logs
propname_massage
- get_stashed open_unique_stashfile
+ get_stashed open_unique_stashfile compress_stashed
dir_identify_vcs build_clone built_stash
hg_dir_revision git_dir_revision vcs_dir_revision
store_revision store_vcs_revision
@@ -843,6 +843,12 @@ sub get_stashed ($$) {
return "$c{Stash}/$oflight/$ojob/$path";
}
+sub compress_stashed($) {
+ my ($path) = @_;
+ my $r= system 'gzip','-9vf','--',"$stash/$path";
+ die "$r $!" if $r;
+}
+
#---------- other stuff ----------
sub host_reboot ($) {
diff --git a/ts-logs-capture b/ts-logs-capture
index 2dd95ea..a0bd936 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -61,10 +61,7 @@ END
target_getfile_root($lho,60, $logfile,"$stash/$llogfile");
if ($logfile !~ m/\.gz$/) {
stat("$stash/$llogfile") or die "$stash/$llogfile $!";
- if ((stat _)[7] > 100000) {
- my $r= system 'gzip','-9vf','--',"$stash/$llogfile";
- die "$r $!" if $r;
- }
+ compress_stashed($llogfile) if(stat _)[7] > 100000;
}
1;
}) {
--
1.7.10.4
next prev parent reply other threads:[~2013-10-31 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-31 16:52 [PATCH OSSTEST 0/3 v2] Stash debug symbols for build results Ian Campbell
2013-10-31 16:53 ` [PATCH OSSTEST v2 1/3] ts-kernel-build: Enable CONFIG_DEBUG_INFO_REDUCED Ian Campbell
2013-10-31 16:53 ` Ian Campbell [this message]
2013-10-31 16:53 ` [PATCH OSSTEST v2 3/3] Stash debug symbols for build results Ian Campbell
2013-10-31 16:56 ` [PATCH OSSTEST 0/3 v2] " Ian Jackson
2013-10-31 16:58 ` Ian Campbell
2013-10-31 17:53 ` Ian Campbell
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=1383238395-14161-2-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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).