From: Ian Campbell <ian.campbell@citrix.com>
To: "Hu, Robert" <robert.hu@intel.com>, ian.jackson@citrix.com
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: OSSTest standalone script
Date: Wed, 14 Oct 2015 10:48:04 +0100 [thread overview]
Message-ID: <1444816084.23192.145.camel@citrix.com> (raw)
In-Reply-To: <9E79D1C9A97CFD4097BCE431828FDD31F4BF85@SHSMSX103.ccr.corp.intel.com>
On Wed, 2015-10-14 at 09:29 +0000, Hu, Robert wrote:
> Hi Ian,
>
> When I now try to use standalone script for debug, it seems doesn't work
> as before. Any usage changed?
>
> [root@robert-ivt osstest]# ./standalone run-job --dry-run -h dummy test
> -amd64-amd64-qemuu-nested
> Could not open a connection to your authentication agent.
> WARNING: Unable to access ssh-agent. Some tests may fail
It seems you do not have a ssh-agent running.
This isn't strictly needed (i.e if your ssh key has no passphrase) hence
this is just a warning.
> ./standalone: line 195: savelog: command not found
And this indicates that you need to install the "savelog" command.
In Debian this comes from the 'debianutils' package, so it is probably
Debian specific, which I had not realised.
If you aren't using Debian then I think the following will help, although
you won't benefit from the rotation of logs, which is the old behaviour.
-----8>--------
>From ed4fd4bf2b175a02b9dbe3e394577b7095a8f3be Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Wed, 14 Oct 2015 10:45:36 +0100
Subject: [PATCH] standalone: only rotate logs if savelog is available
`savelog' comes from the `debianutils' package and so is unlikely to
be available elsewhere. Revert to the old behaviour of clobbering the
logs in this case.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
standalone | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/standalone b/standalone
index 20a6ad5..c804b74 100755
--- a/standalone
+++ b/standalone
@@ -192,7 +192,9 @@ ensure_logs() {
with_logging() {
local log=$1; shift
ensure_logs
- savelog -c 300 -n "$log" >/dev/null
+ if command -v savelog >/dev/null ; then
+ savelog -c 300 -n "$log" >/dev/null
+ fi
"$@" 2>&1 | tee "$log"
rc=${PIPESTATUS[0]}
if [ $rc -ne 0 ] ; then
--
2.5.3
next prev parent reply other threads:[~2015-10-14 9:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 9:29 OSSTest standalone script Hu, Robert
2015-10-14 9:48 ` Ian Campbell [this message]
2015-10-14 9:56 ` Hu, Robert
2015-11-17 10:37 ` 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=1444816084.23192.145.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=robert.hu@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.