debug
[src/qa-testdefinitions.git] / common / scripts / agl-screenshot-test.sh
index cdd536a..ca84b1c 100755 (executable)
@@ -37,9 +37,12 @@ sleep 2
 # create initial journal cursor file
 journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/first-log 2>&1
 
-# restart weston@display
-#systemctl restart weston.service
-systemctl restart agl-session@agl-driver.service
+# stop homescreen (shell) and launcher
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user stop homescreen'
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user stop launcher'
+# restart agl-compositor
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user restart agl-compositor'
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user start homescreen'
 
 # e.g. qemu-system-arm takes loooong
 sleep 10
@@ -112,17 +115,18 @@ if [ "${REF_IMAGE_SHA1SUM}" == "${IMAGE_SHA1SUM}" ]; then
        echo "Screenshot matches the reference image"
        FINALRET=0
 else
+set -x
        echo "Screenshot does not match the reference image"
        FINALRET=127
-       for i in agl-screenshot-*.png ; do
-               #set +x
-               echo "################################################################"
-               ( curl --upload-file "$i" https://transfer.sh/$(basename "$i") && echo "" ) || true
-               echo "################################################################"
-               #set -x
+       for i in /home/agl-driver/agl-screenshot-*.png ; do
+               if [ -x ./artiproxy-upload.sh ];then
+                       ./artiproxy-upload.sh $i $(basename $i)
+               fi
+set +x
+
        done
        echo "#########################"
-       cat /run/platform/display/*.log
+       journalctl -t agl-compositor
        echo "#########################"
        journalctl -b --no-pager -a
        echo "#########################"