summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautomated/lib/android-test-lib2
-rwxr-xr-xautomated/lib/sh-test-lib11
2 files changed, 12 insertions, 1 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib
index 633dd45..a904411 100755
--- a/automated/lib/android-test-lib
+++ b/automated/lib/android-test-lib
@@ -33,7 +33,7 @@ initialize_adb() {
set -x
adb_debug_info
adb start-server
- timeout 600 adb wait-for-device || error_msg "Device NOT found!"
+ timeout 600 adb wait-for-device || error_fatal "Device NOT found!"
adb devices
if [ -z "${ANDROID_SERIAL}" ]; then
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"