Adapt the scripts.
Bug-AGL: SPEC-4813
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: Ief1ca6d35ed4f891082660500c0ab08b307e7674
echo 'HOMESCREEN_DEMO_CI=1' > /etc/default/homescreen
sync
systemctl daemon-reload || true
echo 'HOMESCREEN_DEMO_CI=1' > /etc/default/homescreen
sync
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
# stop homescreen (shell) and launcher
sleep 2
# create initial journal cursor file
journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/first-log 2>&1
# 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'
+systemctl stop homescreen.service
+systemctl stop launcher.service
-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'
+systemctl restart agl-compositor.service
+systemctl start homescreen.service
# e.g. qemu-system-arm takes loooong
sleep 10
# e.g. qemu-system-arm takes loooong
sleep 10
#su - $AGLDRIVER -c "..."
do_screenshot()
{
#su - $AGLDRIVER -c "..."
do_screenshot()
{
- su - $AGLDRIVER -c "XDG_RUNTIME_DIR=/run/user/1001 $AGL_SCREENSHOOTER -a"
# give it a bit more time to display
#sleep 60
# give it a bit more time to display
#sleep 60
-su - $AGLDRIVER -c "XDG_RUNTIME_DIR=/run/user/1001 $AGL_SCREENSHOOTER -l"
if do_screenshot ; then
echo "Screenshot taken"
if do_screenshot ; then
echo "Screenshot taken"
systemctl daemon-reload
sync
sleep 2
systemctl daemon-reload
sync
sleep 2
-systemctl restart agl-session@agl-driver.service
+systemctl restart agl-compositor.service
+systemctl restart homescreen.service
+systemctl restart launcher.service