Add Android IceBT-over-Bluetooth CI testing#5839
Draft
externl wants to merge 3 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds CI coverage for the IceBT (Bluetooth) transport by introducing a two-Android-emulator test harness that runs real Ice Java test suites over emulated RFCOMM (Netsim/Rootcanal), plus a hardware-free C++ endpoint-parsing test and a Linux runner capability probe.
Changes:
- Extend the Python test harness to support two concurrent Android devices/emulators with per-device adb scoping, per-emulator port forwarding, and process-proxy rebinding over the controller connection.
- Add a small Android “pre-bond” helper app (
btecho) and a dedicated GitHub Actions workflow to boot two emulators, bond them, and run selected suites over--protocol=bt. - Add a C++ IceBT endpoint parsing test that doesn’t require a live Bluetooth stack, and add a non-blocking probe step in the main CI workflow to record runner Bluetooth limitations.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/Util.py | Updates Android harness behavior for two-device runs (adb scoping, per-emulator forwards, process proxy rebinding). |
| java/test/android/btecho/src/main/java/com/zeroc/btecho/MainActivity.java | Adds a minimal Bluetooth RFCOMM echo/bond helper activity used by CI pre-bonding. |
| java/test/android/btecho/src/main/AndroidManifest.xml | Declares Bluetooth permissions needed for the pre-bond helper in CI. |
| java/test/android/btecho/settings.gradle | New Gradle settings for the standalone helper app. |
| java/test/android/btecho/gradlew.bat | Adds Gradle wrapper script for Windows (helper app build). |
| java/test/android/btecho/gradlew | Adds Gradle wrapper script for POSIX (helper app build). |
| java/test/android/btecho/gradle/wrapper/gradle-wrapper.properties | Adds Gradle wrapper configuration for the helper app. |
| java/test/android/btecho/gradle/GRADLE_LICENSE | Adds Gradle license text for wrapper distribution. |
| java/test/android/btecho/gradle.properties | Adds Gradle properties used by the helper app project. |
| java/test/android/btecho/build.gradle | Defines the Android application build for the helper app. |
| cpp/test/IceBT/endpoints/test.py | Adds Linux-only harness gating for the new endpoint parsing test (matching build conditions). |
| cpp/test/IceBT/endpoints/Makefile.mk | Builds the endpoint parsing test only when IceBT system libs are available. |
| cpp/test/IceBT/endpoints/Client.cpp | Implements hardware-free parsing/round-trip tests for bt/bts endpoints with plugins not initialized. |
| BLUETOOTH.md | Documents running Android client/server over Bluetooth using two emulators. |
| .github/workflows/ci.yml | Adds a non-failing probe step to report Linux runner Bluetooth stack capability signals. |
| .github/workflows/bt-android-harness.yml | Introduces a scheduled/targeted workflow that runs Android↔Android IceBT tests over emulated Bluetooth. |
externl
force-pushed
the
icebt-bluetooth-ci
branch
2 times, most recently
from
July 7, 2026 18:17
17f7ce6 to
403bd1d
Compare
externl
marked this pull request as draft
July 7, 2026 19:28
externl
force-pushed
the
icebt-bluetooth-ci
branch
6 times, most recently
from
July 8, 2026 16:35
aa99c6c to
e973700
Compare
Add cpp/test/IceBT/endpoints, a client-only test that parses bt/bts endpoint strings with the IceBT plug-in registered but not initialized (Ice.InitPlugins=0), so it needs no BlueZ/D-Bus/radio and runs in the normal Linux suite under tcp.
Extend the Android process controller so the harness can drive two emulators at once, which IceBT-over-Bluetooth cross-testing requires (server on one emulator, client on the other). Device-scope every adb call and give each emulator its own host-side forward port derived from its serial. Fix four issues that only surface with two devices: - stopControllerApp ran `adb kill-server`, a global reset that dropped both emulators' forwards; only reset adb when we own (and just killed) the emulator. - The host->device forward was not re-established after a controller restart. - Spawned process proxies are advertised on the device port, reachable from the host only through the per-emulator forward; rebind them onto the controller connection (bindProcessesToController). - The pidof check used a bare `adb`, ambiguous with two devices. Also add adb-driven device-setup and diagnostics helpers (waitForBoot, bluetoothAddress, enableBluetooth, grantRuntimePermissions, installSystemApp for a privileged /system/priv-app install, bond, and diagnostics), plus a lightweight forDevice constructor, so the CI Bluetooth preparation runs through the harness rather than inline adb shell. installSystemApp retries `adb root`/remount, which can transiently fail when two emulators share one adb server.
Add a workflow that runs real Ice test suites between two Android emulators over emulated Bluetooth. GitHub-hosted Linux runners cannot host a Bluetooth stack, but the Android emulator's userspace virtual controller (Netsim/Rootcanal) does RFCOMM between emulators. It builds the Ice/IceBT/test Java libs, the controller APK, and btecho (a tiny pre-bond helper, since IceBT uses secure RFCOMM which requires a BR/EDR bond), boots two emulators on Netsim BT, then prepares and bonds them via Controller.py --bt-setup / --bt-bond (installing btecho as a privileged system app), runs Controller.py (server) + allTests.py (client) over --protocol=bt, and dumps adb state via --bt-diagnostics. Runs nightly and on PRs touching the IceBT transport or the shared test harness. The suite list -- Ice/operations plus the marshalling core (ami, enums, inheritance, objects, optional) -- is the set verified to pass over emulated RFCOMM.
externl
force-pushed
the
icebt-bluetooth-ci
branch
from
July 8, 2026 20:42
e973700 to
b16c9da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CI coverage for the IceBT (Bluetooth) transport by running real Ice test suites between two Android emulators over the emulator's userspace virtual Bluetooth controller (Netsim/Rootcanal) — no hardware. GitHub-hosted Linux runners can't host a Bluetooth stack, but two emulators do RFCOMM between themselves.
cpp/test/IceBT/endpoints) — parsebt/btsendpoint strings with the plug-in registered but not initialized (Ice.InitPlugins=0); run in the normal Linux suite under tcp.scripts/Util.py) — device-scoped adb + a per-emulator forward port, four two-device reachability fixes, and adb-driven device-setup helpers (boot-wait, priv-app install, BT enable, bond)..github/workflows/bt-android-harness.yml+java/test/android/btecho) — builds the Java libs + controller APK + a pre-bond helper, boots two emulators, prepares/bonds them viaController.py --bt-setup/--bt-bond, then runsController.py(server) +allTests.py(client) over--protocol=bt.Runs nightly and on PRs touching the IceBT transport or the shared harness. Exercises
Ice/operationsplus the marshalling core (ami,enums,inheritance,objects,optional) — the suites verified to pass over emulated RFCOMM. C++↔Java cross-tests stay out of scope (the C++ side needs a host Bluetooth stack). Supersedes #5803.