summaryrefslogtreecommitdiffstats
path: root/run_test_suite
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2013-01-17 12:45:03 +0100
committerTails developers <amnesia@boum.org>2013-01-25 09:44:14 +0100
commita9af03bd961153e9a36d6ea40e460fbfd4dba2c1 (patch)
tree0f7885c24b636a2e72f851a771bd46f2983b983e /run_test_suite
parent7a64075bc51972e2347960b5ee77ed264d4de89a (diff)
Minor refactoring.
Diffstat (limited to 'run_test_suite')
-rwxr-xr-xrun_test_suite11
1 files changed, 8 insertions, 3 deletions
diff --git a/run_test_suite b/run_test_suite
index 78acc9e..ee1a602 100755
--- a/run_test_suite
+++ b/run_test_suite
@@ -26,9 +26,16 @@ start_vnc_server() {
}
start_vnc_viewer() {
+ check_dependency xtightvncviewer
DISPLAY=":0" xtightvncviewer -viewonly localhost:${VNC_SERVER_PORT} 1>/dev/null 2>&1 &
}
+capture_session() {
+ echo "Capturing guest display into ${CAPTURE_FILE}"
+ ffmpeg -f x11grab -s 1024x768 -r 15 -i ${TARGET_DISPLAY}.0 -an \
+ -vcodec libvpx -y "${CAPTURE_FILE}" >/dev/null 2>&1 &
+}
+
# main script
unset CAPTURE_FILE VNC_VIEWER VNC_SERVER
@@ -68,9 +75,7 @@ fi
start_xvfb
if [ -n "${CAPTURE_FILE}" ]; then
- echo "Capturing guest display into ${CAPTURE_FILE}"
- ffmpeg -f x11grab -s 1024x768 -r 15 -i ${TARGET_DISPLAY}.0 -an \
- -vcodec libvpx -y "${CAPTURE_FILE}" >/dev/null 2>&1 &
+ capture_session
fi
if [ -n "${VNC_SERVER}" ]; then
start_vnc_server