aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2024-07-31 15:52:42 -0400
committerScott Murray <scott.murray@konsulko.com>2024-08-01 14:30:07 +0000
commit10f1f2e8ee25afaa39ae7e9533ba66a33aa1074b (patch)
tree5c7eeba8cb47a3c1f95cd2ab9f9de9ef3bb04d7c
parent3ae7db3c14ae86fbaf454406f1bd2f8cac32c102 (diff)
Add Flutter homescreen support to screenshot test
Add logic in the screenshot test script to support the Flutter homescreen in addition to the original Qt version. Bug-AGL: SPEC-5203 Change-Id: Id9cbe9a69700b7e636435b71050dcb173a7a6fc1 Signed-off-by: Scott Murray <scott.murray@konsulko.com> (cherry picked from commit 24eb3fb3eac80295290a0e5c6fc310fea9a46677)
-rwxr-xr-xcommon/scripts/agl-screenshot-test.sh23
1 files changed, 16 insertions, 7 deletions
diff --git a/common/scripts/agl-screenshot-test.sh b/common/scripts/agl-screenshot-test.sh
index 030ef34..7ac573d 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
@@ -158,13 +165,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