]> xenbits.xensource.com Git - osstest.git/commitdiff
standalone: Do not blunder on after errors
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 16 Sep 2015 12:34:28 +0000 (13:34 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 18 Sep 2015 11:37:30 +0000 (12:37 +0100)
./standalone's with_logging function would _log_ errors, but it
wouldn't exit immediately.  As a result, the script would blunder on.

Normally it wouldn't do very much more since most of the with_logging
calls are the last thing it does - but the exit status would be wrong
(0, from echo).

As a result, for example, standalone-generate-dump-flight-runvars
would never properly report make-flight failures.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
standalone

index 873616af928756308f2526d0a15a405f796a5557..60b66662347acaa18a8bda20f9492ca0f970ec37 100755 (executable)
@@ -194,6 +194,7 @@ with_logging() {
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
        echo "FAILED rc=${rc}" >&2
+       exit $rc
     fi
 }