summaryrefslogtreecommitdiffstats
path: root/debian/tests/gui
blob: 785fe74d788282dee448093c8bc44f4fdf0ef6b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# autopkgtest check: Run kodi GUI to see basic functionality working
# Author: Balint Reczey <balint.reczey@canonical.com>
# Modified by Vasyl Gello <vasek.gello@gmail.com>

set -e

export HOME=$AUTOPKGTEST_TMP
KODI_LOG="$HOME/.kodi/temp/kodi.log"

trap 'cat $KODI_LOG' EXIT

[ ! -e $KODI_LOG ] || (echo "ERROR: $KODI_LOG" already exists! ; exit 1)

xvfb-run -e /dev/stdout -s '-screen 0 1920x1080x24 +extension GLX' kodi &
while test ! -e $KODI_LOG; do
    sleep 1
done
tail -f -n +0 $KODI_LOG | grep -m 1 'Listening on port 9777'
kodi-send --host=localhost --port=9777 --action="Quit"
wait

echo "run: OK"