#!/usr/bin/env bash # MobileGL - tools/anland-mobilegl-plasma/scripts/desktop-verify.sh # Copyright (c) 2025-2026 MobileGL-Dev # Licensed under the GNU Lesser General Public License v3.0: # https://www.gnu.org/licenses/gpl-3.0.txt # https://www.gnu.org/licenses/lgpl-3.0.txt # SPDX-License-Identifier: LGPL-3.0-only # End of Source File Header # desktop-verify.sh ... - check that the MobileGL desktop starts, idles and stops by itself # (anland app: foreground service + mobilegl-desktop.sh; container: desktop-session.service). # Phases run in the order given; screenshots go to $ANL_DIR/dv-.png. # # push install device/*.sh into $DEV_TOOLS (push-tools.sh's device half) # reset everything down: app force-stopped (its service with it), container stopped, # experiment display daemon killed - the state after a phone reboot # cold reset, then open the app like its icon does and time each piece (desktop-timeline.sh) # open open the app without resetting (after a reboot: the reboot was the reset) # chrome (re)start Chrome in the session on an animated WebGL page (kills a running Chrome) # idle CPU/GPU for visible, hidden (HOME), locked (screen off), visible again (measure.sh) # reopen swipe the app away (remove its task), check KWin survives, open it again, time it # stop Stop desktop from the notification (the service's STOP action) and check it all ends # rtest lock/unlock + window resize regression ($ANL_DIR/rtest.sh) # Env: SECS (idle window, default 20), URL (chrome page). set -euo pipefail here=$(cd "$(dirname "$0")" && pwd) . "$here/env.sh" SECS=${SECS:-20} URL=${URL:-https://webglsamples.org/aquarium/aquarium.html} SOCK=$DEV_SHARE/display.sock su_() { adb_ shell "su -c '$*'"; } shot() { su_ "screencap -p $DEV_SHARE/dv-$1.png" adb_ pull "$DEV_SHARE/dv-$1.png" "$ANL_DIR/dv-$1.png" > /dev/null && echo "screenshot $ANL_DIR/dv-$1.png" } kwin_log() { # the anland backend's lines since