summaryrefslogtreecommitdiffstats
path: root/run_test_suite
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-01-17 12:24:48 +0100
committerTails developers <amnesia@boum.org>2013-01-25 09:44:14 +0100
commit7a64075bc51972e2347960b5ee77ed264d4de89a (patch)
tree4910e502d214d6a80825501172cdc13c61a4082b /run_test_suite
parent4b40609036d8baa0cef5f29fdeec788a8b9409e6 (diff)
Add better error handling.
Diffstat (limited to 'run_test_suite')
-rwxr-xr-xrun_test_suite10
1 files changed, 7 insertions, 3 deletions
diff --git a/run_test_suite b/run_test_suite
index 2073b7a..78acc9e 100755
--- a/run_test_suite
+++ b/run_test_suite
@@ -4,9 +4,14 @@
set -e
-NAME="$0"
+NAME=$(basename ${0})
TARGET_DISPLAY=:8
+error() {
+ echo "${NAME}: error: ${*}" >&2
+ exit 1
+}
+
start_xvfb() {
Xvfb $TARGET_DISPLAY -screen 0 1024x768x24+32 >/dev/null 2>&1 &
XVFB_PID=$!
@@ -57,8 +62,7 @@ while [ $# -gt 0 ]; do
done
if [ -z "${ISO}" ]; then
- echo "No ISO provided. Aborting..." >&2
- exit 1
+ error "No ISO provided. Aborting..."
fi
start_xvfb