Fix stale sync test baselines and missing test targets

This commit is contained in:
waozi committed 2026-10-24 15:50:01 -03:00
1 parent b3246778b7
commit 6cf048cfee
5 files changed
+36 -2

No files matched your search

+9
View File
@@ -27,6 +27,15 @@ android-text-selection-test:
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
$(GRADLE) --no-daemon --project-dir tests/android-text-selection test
# Manual USB Moto test; the helper accepts only the separate verification APK
# and restores the existing verification profile after its reader cases.
.PHONY: android-library-device-test
android-library-device-test:
@test -n "$(APK)" || { echo "Set APK to the Android verification APK"; exit 2; }
$(MAKE) $(BUILD_DIR)/node-apps/library.zx
python3 tests/android_library_device.py run --apk "$(abspath $(APK))" \
--bundle "$(abspath $(BUILD_DIR)/node-apps/library.zx)"
.PHONY: android-jni-zi-test
android-jni-zi-test: $(ZI2C_BIN)
@python3 tests/android_jni_zi_test.py $(abspath $(dir $(ZI2C_BIN)))
+5
View File
@@ -218,6 +218,11 @@ arcade-ui-test: $(TARGET)
@test -n "$(ARCADE_BUNDLE)" || { echo "Set ARCADE_BUNDLE to the arcade.zx collection built by Arcade"; exit 2; }
@sh tests/arcade_ui_test.sh $(abspath $(TARGET)) $(abspath $(ARCADE_BUNDLE))
.PHONY: shared-progress-ui-test
shared-progress-ui-test: $(TARGET)
@test -n "$(ARCADE_BUNDLE)" || { echo "Set ARCADE_BUNDLE to the arcade.zx collection built by Arcade"; exit 2; }
@sh tests/shared_progress_ui_test.sh $(abspath $(TARGET)) $(abspath $(ARCADE_BUNDLE))
# Missing practice pictures fail the visual gate in CI and releases.
.PHONY: practice-images-ui-test
practice-images-ui-test: $(TARGET)
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
# The supplied Arcade package runs in a disposable profile on a private display.
set -eu
root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
binary=${1:?Pass the Breeze binary}
package=${2:?Pass an Arcade package, arcade.zx}
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
-u GDK_DISPLAY -u SESSION_MANAGER YUE_DESKTOP_RECOVERY=0 \
SDL_VIDEODRIVER=x11 LIBGL_ALWAYS_SOFTWARE=1 SDL_AUDIODRIVER=dummy APP_NO_TRAY=1 \
timeout 240s xvfb-run -a -n 400 -s '-noreset -screen 0 1280x900x24' \
python3 "$root/tests/shared_progress_ui_test.py" "$binary" "$package"
+1 -1
View File
@@ -1,4 +1,4 @@
version 7
version 8
active
activity
after
+10 -1
View File
@@ -41,7 +41,7 @@ def restore_statements():
assert enqueue, "storage_enqueue_all_sync_state"
inserts = re.findall(r'exec_sql\("(INSERT INTO sync_outbox[^"]*)"\)',
enqueue.group(1))
assert len(inserts) == 18, inserts
assert len(inserts) == 19, inserts
return clear + inserts
@@ -72,6 +72,7 @@ ENTITIES = [
# queued all or none, alternating over the cases above, so the exhaustive
# check stays small.
NESTED = "nested." + "ab" * 32 + ".position"
GAME_PROGRESS = "entity.game-progress." + "ab" * 16
EXTRA = [
("app_record", NESTED, 0),
("app_install", "app_used_chess", 0),
@@ -81,6 +82,7 @@ EXTRA = [
("habit_reward", "r1", 0),
("habit_coin", "k1", 0),
("habit_setting", "habit_shop_borrow_limit", 0),
("entity_record", GAME_PROGRESS, 0),
("entity_record", "entity.photos." + "ab" * 32, 0),
]
@@ -122,12 +124,19 @@ def open_database():
for key in ("nested." + "ag" * 32 + ".position", "nested." + "ab" * 32 + ".",
"nested." + "ab" * 32 + ".Big", "app_used_achievement"):
insert_row(database, "settings", {"user_id": "u1", "key": key, "value": "1", "updated_at": 2})
# Game progress uses a 32-hex entity ID and valid JSON in this account.
insert_row(database, "settings", {"user_id": "u1", "key": GAME_PROGRESS, "value": "{}", "updated_at": 2})
for key, value in (("entity.game-progress." + "ag" * 16, "{}"),
("entity.game-progress." + "ab" * 15, "{}"),
("entity.game-progress." + "cd" * 16, "not json")):
insert_row(database, "settings", {"user_id": "u1", "key": key, "value": value, "updated_at": 2})
# A photo kept once in the account's entity data, by its 64-hex digest;
# other names and unreadable values are never queued.
insert_row(database, "settings", {"user_id": "u1", "key": "entity.photos." + "ab" * 32, "value": "{}", "updated_at": 2})
insert_row(database, "settings", {"user_id": "u1", "key": "entity.photos." + "ag" * 32, "value": "{}", "updated_at": 2})
insert_row(database, "settings", {"user_id": "u1", "key": "entity.photos." + "cd" * 32, "value": "not json", "updated_at": 2})
insert_row(database, "users", {"id": "u2"})
insert_row(database, "settings", {"user_id": "u2", "key": "entity.game-progress." + "ef" * 16, "value": "{}", "updated_at": 2})
insert_row(database, "settings", {"user_id": "u2", "key": "entity.photos." + "ef" * 32, "value": "{}", "updated_at": 2})
insert_row(database, "settings", {"user_id": "u2", "key": "habit_shop_borrow_limit", "value": "999", "updated_at": 2})
insert_row(database, "settings", {"user_id": "u2", "key": "nested." + "cd" * 32 + ".position", "value": "foreign", "updated_at": 2})