diff options
-rwxr-xr-x | common/scripts/agl-screenshot-test.sh | 27 | ||||
-rwxr-xr-x | common/scripts/artiproxy-upload.sh | 3 | ||||
-rwxr-xr-x | common/scripts/service-check-gfx.sh | 2 | ||||
-rwxr-xr-x | common/scripts/service-check-nogfx.sh | 2 |
4 files changed, 24 insertions, 10 deletions
diff --git a/common/scripts/agl-screenshot-test.sh b/common/scripts/agl-screenshot-test.sh index 030ef34..c1bc50c 100755 --- a/common/scripts/agl-screenshot-test.sh +++ b/common/scripts/agl-screenshot-test.sh @@ -32,12 +32,17 @@ if [ ! -f "${REF_IMAGE}" ]; then exit 125 fi +HOMESCREEN=homescreen +if [ -f /usr/lib/systemd/system/flutter-ics-homescreen.service ]; then + HOMESCREEN=flutter-ics-homescreen +fi + # Enable the test picture and disable cursor and any other application from being displayed sed -i '/^\[core\]/a activate-by-default=false' /etc/xdg/weston/weston.ini # setup homescreen env variable sed -i '/^\[core\]/a hide-cursor=true' /etc/xdg/weston/weston.ini # enable red/green/blue test screen -echo 'HOMESCREEN_DEMO_CI=1' > /etc/default/homescreen +echo 'HOMESCREEN_DEMO_CI=1' > /etc/default/$HOMESCREEN sync systemctl daemon-reload || true sleep 2 @@ -46,11 +51,13 @@ sleep 2 journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/first-log 2>&1 # stop homescreen (shell) and launcher -systemctl stop homescreen.service -systemctl stop launcher.service +systemctl stop $HOMESCREEN.service +if [ "$HOMESCREEN" = "homescreen" ]; then + systemctl stop launcher.service +fi # restart agl-compositor systemctl restart agl-compositor.service -systemctl start homescreen.service +systemctl start $HOMESCREEN.service # e.g. qemu-system-arm takes loooong sleep 10 @@ -135,11 +142,13 @@ for SCREENSHOT in agl-screenshot-*.png ; do break else echo "A Screenshot does not match the reference image" + curl -F "file=@./${SCREENSHOT}" https://x0.at/ || true FINALRET=127 fi - done + + if [ $FINALRET != 0 ] ; then for i in agl-screenshot-*.png ; do ${SCRIPTDIR}/./artiproxy-upload.sh $i "$i" @@ -158,13 +167,15 @@ fi sed -i '/activate-by-default=false/d' /etc/xdg/weston/weston.ini sed -i '/hide-cursor=true/d' /etc/xdg/weston/weston.ini #rm -rf /etc/systemd/system/weston@.service.d -rm -rf /etc/default/homescreen +rm -rf /etc/default/$HOMESCREEN systemctl daemon-reload sync sleep 2 systemctl restart agl-compositor.service -systemctl restart homescreen.service -systemctl restart launcher.service +systemctl restart $HOMESCREEN.service +if [ "$HOMESCREEN" = "homescreen" ]; then + systemctl restart launcher.service +fi sleep 10 diff --git a/common/scripts/artiproxy-upload.sh b/common/scripts/artiproxy-upload.sh index 2d4302b..a4a5685 100755 --- a/common/scripts/artiproxy-upload.sh +++ b/common/scripts/artiproxy-upload.sh @@ -1,5 +1,8 @@ #!/bin/sh +curl --silent -F "file=@./$1" https://x0.at/ || true + + if [ -z "$PYARTIPROXY_IP" ];then echo "DEBUG: No PYARTIPROXY_IP variable, using fallbacks" diff --git a/common/scripts/service-check-gfx.sh b/common/scripts/service-check-gfx.sh index 63e557e..96a10f2 100755 --- a/common/scripts/service-check-gfx.sh +++ b/common/scripts/service-check-gfx.sh @@ -20,7 +20,7 @@ while getopts ":b:d:" option; do done REQUIREDSOCKETS="dbus.socket" -REQUIREDSERVICES="connman.service weston.service" +REQUIREDSERVICES="" ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}" RESULT="unknown" diff --git a/common/scripts/service-check-nogfx.sh b/common/scripts/service-check-nogfx.sh index 68bc36a..3a3a3b7 100755 --- a/common/scripts/service-check-nogfx.sh +++ b/common/scripts/service-check-nogfx.sh @@ -5,7 +5,7 @@ export TERM=dumb export COLUMNS=1000 REQUIREDSOCKETS="dbus.socket" -REQUIREDSERVICES="connman.service" +REQUIREDSERVICES="" ALL="${REQUIREDSOCKETS} ${REQUIREDSERVICES}" RESULT="unknown" |