diff options
author | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-01-27 05:13:46 +0000 |
---|---|---|
committer | Ryota MIBU <r-mibu@cq.jp.nec.com> | 2017-02-02 10:23:07 +0000 |
commit | 89cd27c623e929e837a02eef0622c4ef33772ade (patch) | |
tree | b7248e6877f23fc7e7ec21b001e2ea48d62544d8 /tests/functions-common | |
parent | c9d0d2c9fc16f2e989444bc4d7d8fab8060433ba (diff) |
Fix functions for fuel installer
JIRA: DOCTOR-58
Change-Id: Ic9326791007a3afa754cc64423b46adc17c59dc0
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'tests/functions-common')
-rw-r--r-- | tests/functions-common | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/functions-common b/tests/functions-common index 08d489e5..7928f20c 100644 --- a/tests/functions-common +++ b/tests/functions-common @@ -4,7 +4,7 @@ # is_set env-var function is_set { local var=\$"$1" - eval "[ -n \"$var\" ]" + eval "[[ -n \"$var\" ]]" } # Prints backtrace info @@ -41,6 +41,8 @@ function err { # die $LINENO "message" function die { local exitcode=$? + local xtrace + xtrace=$(set +o | grep xtrace) set +o xtrace local line=$1; shift if [ $exitcode == 0 ]; then @@ -50,6 +52,7 @@ function die { err $line "$*" # Give buffers a second to flush sleep 1 + $xtrace exit $exitcode } |