[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] OSSTest standalone script



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@xxxxxxxxxx>
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@xxxxxxxxxx>
---
 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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.