Skip to content

Commit d3774f4

Browse files
committed
ci(flet-test): non-blocking android logcat; disable AT-SPI a11y on linux
Android: drop the background 'adb logcat &' (a streaming child can keep the emulator-runner script from finishing); dump the ring buffer after the run with non-blocking 'adb logcat -d' instead. Linux: the app and software GL are fine (glxinfo shows llvmpipe; the bundle runs directly without crashing) — exit 79 is specific to the integration_test path, which enables the semantics tree and makes GTK embed an ATK a11y socket that doesn't exist under xvfb. Disable the AT-SPI bridge (NO_AT_BRIDGE/GTK_A11Y).
1 parent 433869f commit d3774f4

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/flet-test.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,15 @@ jobs:
163163
shell: bash
164164
working-directory: ${{ env.APP_DIR }}
165165
# Force Mesa software GL on Linux (xvfb has no GPU); harmless elsewhere.
166+
# NO_AT_BRIDGE/GTK_A11Y disable the AT-SPI accessibility bridge: the
167+
# integration_test binding turns on the semantics tree, which makes GTK
168+
# try to embed an ATK socket onto an a11y bus that doesn't exist under
169+
# xvfb (Atk-CRITICAL) — the app then aborts before Flet/Python start.
166170
env:
167171
LIBGL_ALWAYS_SOFTWARE: "true"
168172
GALLIUM_DRIVER: llvmpipe
173+
NO_AT_BRIDGE: "1"
174+
GTK_A11Y: none
169175
run: ${{ matrix.test_cmd }}
170176

171177
# -------- Linux: on failure, surface the GL renderer + the bundle's own
@@ -206,21 +212,18 @@ jobs:
206212
disable-animations: true
207213
emulator-options: -no-snapshot -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
208214
working-directory: ${{ env.APP_DIR }}
209-
# Capture only the embedded-Python + crash tags to a file (a tight
210-
# filter that won't bog down the software emulator the way a verbose
211-
# firehose does), then dump it after the run. `|| CODE=$?` guarantees
212-
# the dump runs even when the test fails (the runner's script aborts
213-
# on the first non-zero exit otherwise).
215+
# No background logcat (a streaming `adb logcat &` can keep the
216+
# runner's script from finishing). Enlarge the ring buffer, run the
217+
# test, then dump the relevant slice with non-blocking `adb logcat -d`
218+
# (dumps + exits). `|| CODE=$?` guarantees the dump runs on failure
219+
# (the runner aborts the script on the first non-zero exit otherwise).
214220
script: |
221+
adb logcat -G 4M || true
215222
adb logcat -c || true
216-
adb logcat -v time \
217-
flet.python:V python:V AndroidRuntime:E DEBUG:F libc:F '*:S' \
218-
> /tmp/logcat.txt 2>&1 &
219-
LCPID=$!
220223
CODE=0
221224
uv run flet test android -d emulator-5554 --python-version ${PYTHON_VERSION} --yes -v || CODE=$?
222-
kill "$LCPID" 2>/dev/null || true
223225
echo "::group::device logcat (python + crashes)"
224-
tail -n 300 /tmp/logcat.txt || true
226+
adb logcat -d -v time \
227+
flet.python:V python:V AndroidRuntime:E DEBUG:F libc:F '*:S' | tail -n 300 || true
225228
echo "::endgroup::"
226229
exit $CODE

0 commit comments

Comments
 (0)