From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: OSSTest standalone script Date: Wed, 14 Oct 2015 10:48:04 +0100 Message-ID: <1444816084.23192.145.camel@citrix.com> References: <9E79D1C9A97CFD4097BCE431828FDD31F4BF85@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <9E79D1C9A97CFD4097BCE431828FDD31F4BF85@SHSMSX103.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Hu, Robert" , ian.jackson@citrix.com Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org 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 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 --- 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