From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST 2/3] standalone: Check job status at end of run-job. Date: Tue, 29 Sep 2015 10:37:48 +0100 Message-ID: <1443519469-22866-2-git-send-email-ian.campbell@citrix.com> References: <1443519444.16718.18.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1443519444.16718.18.camel@citrix.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: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org Check if the job passed and if not (so status is fail, broken, running etc) then return an error. This is convenient for scripting. Signed-off-by: Ian Campbell --- standalone | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/standalone b/standalone index 0a5d96f..e85457d 100755 --- a/standalone +++ b/standalone @@ -299,6 +299,11 @@ case $op in OSSTEST_HOST_REUSE=$reuse \ OSSTEST_SIMULATE=$dryrun \ with_logging logs/$flight/$job.log ./sg-run-job $job + + status=`job_status $flight $job` + echo "$flight.$job status = $status" >&2 + if [ "x$status" != xpass ] ; then exit 1; fi + ;; run-test) need_flight; need_host -- 2.5.3