summaryrefslogtreecommitdiff
path: root/automated/lib/sh-test-lib
diff options
context:
space:
mode:
Diffstat (limited to 'automated/lib/sh-test-lib')
-rwxr-xr-xautomated/lib/sh-test-lib11
1 files changed, 11 insertions, 0 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index ed0d96e..a948e7a 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -3,6 +3,17 @@
LANG=C
export LANG
+error_fatal() {
+ msg="$1"
+ [ -z "${msg}" ] && msg="Unknown error"
+ if which lava-test-raise;then
+ lava-test-raise msg
+ else
+ printf "FATAL ERROR: %s\n" "${msg}" >&2
+ fi
+ exit 1
+}
+
error_msg() {
msg="$1"
[ -z "${msg}" ] && msg="Unknown error"