X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=common%2Fscripts%2Fagl-screenshot-test.sh;h=ca84b1cf22414f178e1fec0eb6c6ca46a19c1458;hb=b0363b06ef5168fb252374953bc3a0cfba591870;hp=84e4d856981823c65e5e2a140e1596911b4744c2;hpb=e37a0075c86c57f7d6a06c8bb8c0edc8b83ee98c;p=src%2Fqa-testdefinitions.git diff --git a/common/scripts/agl-screenshot-test.sh b/common/scripts/agl-screenshot-test.sh index 84e4d85..ca84b1c 100755 --- a/common/scripts/agl-screenshot-test.sh +++ b/common/scripts/agl-screenshot-test.sh @@ -30,15 +30,19 @@ 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 sync -systemctl daemon-reload +systemctl daemon-reload || true +su - agl-driver -c 'export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1001/bus" ; systemctl --user daemon-reload' || true 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 @@ -111,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 "#########################"