lomiri.qtmir: 0.8.0-unstable-2025-05-20 -> 0.8.0-unstable-2026-03-11

Behaves abit differently, so changes to the Lomiri VM tests were necessary.
This commit is contained in:
OPNA2608
2026-05-19 09:31:21 +02:00
parent e6e4396686
commit 721887edc0
2 changed files with 50 additions and 31 deletions

View File

@@ -142,7 +142,40 @@ let
with machine.nested("Ensuring terminalTextColor {} stays present on the screen:".format(terminalTextColor)):
retry(fn=check_for_color_continued_presence(terminalTextColor), timeout_seconds=5)
def ensure_lomiri_running() -> None:
def change_tty_back_forth(ttynumMain: int, ttynumDiff: int) -> None:
"""
A qtmir bump made the image get stuck, a tty switch back and forth fixes it.
"""
machine.send_key(f"ctrl-alt-f{ttynumDiff}")
machine.sleep(10)
machine.send_key(f"ctrl-alt-f{ttynumMain}")
machine.sleep(10)
def ensure_greeter_launched() -> None:
"""
Ensure that Lomiri (in greeter mode) has started up and is responsive.
Execution will stop at the user selection.
"""
machine.wait_for_unit("display-manager.service")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
# Start page shows current time
wait_for_text(r"(AM|PM)")
# Display "hangs" since qtmir bump? Not sure why. Switch to a different tty and back, and ensure that time is still shown
# Greeter runs on: tty1
change_tty_back_forth(1, 2)
wait_for_text(r"(AM|PM)")
machine.screenshot("lomiri_greeter_launched")
# Advance to user selection, to make sure display really isn't stuck anymore
machine.send_key("ret")
wait_for_text("${description}")
machine.screenshot("lomiri_greeter_login")
def ensure_lomiri_running(ttynumMain: int = 1, ttynumDiff: int = 2) -> None:
"""
Ensure that Lomiri has finished starting up.
"""
@@ -150,9 +183,6 @@ let
# Process runs
machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'")
# Output rendering from Lomiri has started when it starts printing performance diagnostics
machine.wait_for_console_text("Last frame took")
# One of the last UI elements that loads is the clock. In the past, we could OCR for AM/PM to ensure it's there. That is now flaky.
# The next best thing is to look for the launcher button, and ensure it stays around for awhile (DE doesn't crash).
launcherColor: str = "#5277C3"
@@ -161,6 +191,15 @@ let
with machine.nested("Ensuring launcherColor {} stays present on the screen:".format(launcherColor)):
retry(fn=check_for_color_continued_presence(launcherColor), timeout_seconds=30)
# Display "hangs" since qtmir bump? Not sure why. Switch to a different tty and back, and ensure that launcher button is still shown
change_tty_back_forth(ttynumMain, ttynumDiff)
with machine.nested("Waiting for the screen to have launcherColor {} on it:".format(launcherColor)):
retry(check_for_color(launcherColor))
# First input seems to get dropped while Mir registers the new input device. Send a key that does nothing, to get that out of the way, and sleep a tiny bit for registration to finish.
machine.send_key("left")
machine.sleep(3)
machine.screenshot("lomiri_launched")
def wait_for_text(text) -> None:
@@ -358,17 +397,7 @@ in
# Lomiri in greeter mode should work & be able to start a session
with subtest("lomiri greeter works"):
machine.wait_for_unit("display-manager.service")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
# Start page shows current time
wait_for_text(r"(AM|PM)")
machine.screenshot("lomiri_greeter_launched")
# Advance to login part
machine.send_key("ret")
wait_for_text("${description}")
machine.screenshot("lomiri_greeter_login")
ensure_greeter_launched()
# Login
machine.send_chars("${password}\n")
@@ -771,24 +800,14 @@ in
# Lomiri in greeter mode should use the correct keymap
with subtest("lomiri greeter keymap works"):
machine.wait_for_unit("display-manager.service")
machine.wait_until_succeeds("pgrep -u lightdm -f 'lomiri --mode=greeter'")
# Start page shows current time
# And the greeter *actually* renders our wallpaper!
wait_for_text(r"(AM|PM|Lorem|ipsum)")
machine.screenshot("lomiri_greeter_launched")
# Advance to login part
machine.send_key("ret")
wait_for_text("${description}")
machine.screenshot("lomiri_greeter_login")
ensure_greeter_launched()
# Login
machine.send_chars("${pwInput}\n")
# And the desktop doesn't render the wallpaper anymore. Grumble grumble...
ensure_lomiri_running()
# When going lomiri(greeter) -> lomiri(desktop), we run on tty2
ensure_lomiri_running(2, 1)
# Lomiri in desktop mode should use the correct keymap
with subtest("lomiri session keymap works"):

View File

@@ -36,13 +36,13 @@ stdenv.mkDerivation (finalAttrs: {
# Not regular qtmir, experimental support for Mir 2.x
# Currently following https://gitlab.com/ubports/development/core/qtmir/-/tree/personal/sunweaver/debian-upstream
pname = "qtmir-debian-upstream";
version = "0.8.0-unstable-2025-05-20";
version = "0.8.0-unstable-2026-03-11";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/qtmir";
rev = "b35762f5198873560138a810b387ae9401615c02";
hash = "sha256-v5mdu3XLK4F5O56GDItyeCFsFMey4JaNWwXRlgjKFMA=";
rev = "57d9e9763933a5d6ca696676ebdde934529a71fe";
hash = "sha256-xlMxBnEru4YK0BxUOd/jni9OTb6lZlw6nyHLNqdfY20=";
};
outputs = [