diff --git a/scripts/test-android-e2e-runner.sh b/scripts/test-android-e2e-runner.sh index 8c5ab2f8..01416d00 100755 --- a/scripts/test-android-e2e-runner.sh +++ b/scripts/test-android-e2e-runner.sh @@ -11,7 +11,7 @@ die() { } list_output=$($runner --list) || die "Android E2E runner could not list modules" -grep -Fq "Modules: all signed-out connect capture composer autocomplete outliner hierarchy audio navigation graphs settings flashcards search rich-content youtube node-tag page-actions shortcuts sharing editor-regressions sharing-image" <<<"$list_output" \ +grep -Fq "Modules: all signed-out smoke connect capture composer autocomplete outliner hierarchy audio navigation graphs settings flashcards search rich-content youtube node-tag page-actions shortcuts sharing editor-regressions sharing-image" <<<"$list_output" \ || die "Android E2E runner did not list every module" grep -Fq "tests/e2e/android-staging-connect.yaml" <<<"$list_output" \ || die "Android E2E runner did not list the connection flow" @@ -255,6 +255,7 @@ PATH="$mock_bin:$PATH" \ LOGSEQ_CHAT_E2E_USERNAME=test-user \ LOGSEQ_CHAT_E2E_PASSWORD=test-password \ LOGSEQ_CHAT_E2E_BASE_URL=http://127.0.0.1:8787 \ + LOGSEQ_CHAT_ANDROID_E2E_SKIP_DB_SYNC_WAIT=1 \ "$runner" connect >/dev/null grep -Fxq -- '-s test-device reverse tcp:8787 tcp:8787' "$adb_args" \ || die "Android E2E runner did not expose the host-local backend to the device" diff --git a/scripts/test-android-e2e.sh b/scripts/test-android-e2e.sh index ed0799c9..c7a40016 100755 --- a/scripts/test-android-e2e.sh +++ b/scripts/test-android-e2e.sh @@ -380,6 +380,7 @@ seed_android_fixture() { } if [[ -n ${LOGSEQ_CHAT_E2E_BASE_URL:-} ]] \ + && [[ ${LOGSEQ_CHAT_ANDROID_E2E_SKIP_DB_SYNC_WAIT:-0} != 1 ]] \ && [[ $LOGSEQ_CHAT_E2E_BASE_URL =~ ^(http|https)://(127\.0\.0\.1|localhost)(:([0-9]+))?([/?#]|$) ]]; then # CI builds db-sync in a background process; flows must not start before # it binds the port (a bound port returns any HTTP response, incl. 401/404). @@ -455,7 +456,14 @@ for flow in "${flows[@]}"; do -e "PASSWORD=$LOGSEQ_CHAT_E2E_PASSWORD" ) fi - MAESTRO_CLI_NO_ANALYTICS=1 maestro "${maestro_args[@]}" "$flow_path" + adb -s "$device" logcat -c >/dev/null 2>&1 || true + if ! MAESTRO_CLI_NO_ANALYTICS=1 maestro "${maestro_args[@]}" "$flow_path"; then + # OCaml lui_* FFI exceptions and [NativeEffect] drain traces land in + # logcat — dump it so a wedged pipeline is diagnosable from CI output. + echo "==> $flow failed — device logcat follows" >&2 + adb -s "$device" logcat -d -v brief 2>/dev/null | tail -n 400 >&2 || true + exit 1 + fi if [[ $flow == "$sharing_image_flow" ]]; then adb -s "$device" shell run-as "$app_id" rm -f "$app_share_image" fi