]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
standalone: Check job status at end of run-job.
authorIan Campbell <ian.campbell@citrix.com>
Fri, 25 Sep 2015 13:32:25 +0000 (14:32 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 8 Oct 2015 16:17:54 +0000 (17:17 +0100)
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 <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
standalone

index 98a323f2fbc8d16a2184a725859fd4d123f0ab39..7c7fde9e805a9fbb5e2ddd7526594f32e17cf870 100755 (executable)
@@ -300,6 +300,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