fix(config): honor ANDROID_ADB_SERVER_PORT as an ADB port fallback - #146
Open
xianjianlf2 wants to merge 1 commit into
Open
xianjianlf2 wants to merge 1 commit into
xianjianlf2 wants to merge 1 commit into
Conversation
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.
When an ADB server is listening on the port selected by
ANDROID_ADB_SERVER_PORT, Artemis currently falls back to 5037 and cannot see the same devices asadb(reported in #122).Accept
ANDROID_ADB_SERVER_PORTas a validation alias forSettings.ADB_PORT. An explicitly configuredADB_PORTstill wins; the default remains 5037. ExistingADB_SERVER_SOCKETselection is unchanged. The environment template documents the fallback.The regression tests cover default and explicit ports, constructor overrides, socket precedence, and startup synchronization into settings, subprocess environment, and ADB command arguments. The two regression cases failed with
5037 != 8848before the fix and pass afterward.Fixes #122.
Validation on macOS / Python 3.12:
ANDROID_ADB_SERVER_PORT=8848selects port 8848 and buildsadb -H 127.0.0.1 -P 8848 devices.make typecheck, Ruff formatting, Ruff lint for changed Python files, and the quality ratchet pass.make test: 2108 passed, 88 failed, 6 skipped, 8 deselected. An unmodified checkout of main (371aa6d) has 2101 passed and the exact same 88 failing test IDs.make lintencounters the same 11 existing Ruff violations inplayground/backend_manageras unmodified main.No physical-device validation was performed. Implementation and regression tests were prepared with Codex assistance.