The launcher decided whether to export WEBKIT_DISABLE_COMPOSITING_MODE by asking the host's pkg-config — but LD_LIBRARY_PATH makes the BUNDLED libwebkit2gtk the one that actually runs, so on any machine where the two diverge the detection read the wrong number. This was the second bug identified during #961's investigation (the reporter built from source, so their dev packages answered pkg-config with a healthy version while the shipped bundle ran an older lib) and was explicitly deferred in #1007 as not-safely-fixable at runtime. The fix makes it knowable by construction instead: inject-apprun.sh runs at bundle time ON the build host whose libwebkit2gtk gets bundled, so it stamps that version into .bundled-webkitgtk-version inside the AppDir. AppRun reads the stamp first and only falls back to host pkg-config for bundles predating it. Empty/unreadable stamp fails safe (workaround on), same philosophy as the missing-pkg-config path. Tests: 3 new cases in AppRun.test.sh — marker-beats-host in both directions (broken-marker/healthy-host and the #961 inversion, healthy-marker/broken-host) plus empty-marker fail-safe. Also wires AppRun.test.sh into pytest (tests/test_apprun_launcher.py) — it was previously run by NO CI job, so the launcher could regress silently. Also documents Windows install-to-another-drive behavior in docs/install/windows.md (#938): local drives work via the wizard's directory picker, mapped network drives are a Windows Installer limitation, and the data directory moves independently of the app. Co-authored-by: mergetest <test@local> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
"""Run the AppImage AppRun launcher's shell unit tests under pytest.
|
|
|
|
AppRun.test.sh existed but was wired into NO CI job — the launcher's
|
|
workaround auto-detection (which decides whether shipped Linux builds get
|
|
WEBKIT_DISABLE_COMPOSITING_MODE) could regress silently. This wrapper rides
|
|
the standard "Tests (backend + frontend)" gate instead of needing its own
|
|
workflow step. Covers the #961 follow-up too: the build-time
|
|
.bundled-webkitgtk-version marker must beat the host's pkg-config answer.
|
|
"""
|
|
import os
|
|
import shutil
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
_REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
_SCRIPT = os.path.join(_REPO, "frontend", "src-tauri", "appimage", "AppRun.test.sh")
|
|
|
|
|
|
@pytest.mark.skipif(shutil.which("bash") is None, reason="bash not available")
|
|
def test_apprun_shell_suite_passes():
|
|
proc = subprocess.run(
|
|
["bash", _SCRIPT], capture_output=True, text=True, timeout=120,
|
|
)
|
|
assert proc.returncode == 0, (
|
|
f"AppRun.test.sh failed (exit {proc.returncode}):\n"
|
|
f"{proc.stdout}\n{proc.stderr}"
|
|
)
|
|
assert "0 fail" in proc.stdout
|