Skip to content

Fix miscellaneous minor bugs in android_device_lib and test_runner - #1046

Open
xpconanfan wants to merge 2 commits into
masterfrom
android-device-fixes
Open

xpconanfan wants to merge 2 commits into
masterfrom
android-device-fixes

Conversation

@xpconanfan

@xpconanfan xpconanfan commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator
  • SnippetClientV2._read_protocol_line: remove the duplicate self._server_start_stdout = [] reset that wiped output collected by the first protocol-line read.
  • AdbProxy.connect: pass stderr=b'' (bytes) to AdbError so callers like root() that call e.stderr.decode() don't fail with AttributeError.
  • SnippetManagementService: pass self._device (not self) to Error (a DeviceError subclass), and drop the unused self._is_alive attribute.
  • ServiceManager.list_live_services: use a list comprehension instead of for_each so a pure query doesn't go through expect_no_raises.
  • JsonRpcShellBase: raise Error instead of assert (which is stripped under python -O).
  • TestRunner.get_full_test_names: fix broken error formatting (Error('... %s ...', (...)) passed a 2-arg tuple to Exception instead of formatting the string).

@xpconanfan xpconanfan changed the title Stop AndroidDevice.build_info from probing fastboot on cache hits Fix miscellaneous minor bugs in android_device_lib and test_runner Oct 6, 2026
@xpconanfan
xpconanfan force-pushed the android-device-fixes branch from 56804b7 to 2afbcf8 Compare October 6, 2026 07:47
* `SnippetClientV2._read_protocol_line`: remove the duplicate `self._server_start_stdout = []` reset that wiped output collected by the first protocol-line read.
* `AdbProxy.connect`: pass `stderr=b''` (bytes) to `AdbError` so callers like `root()` that call `e.stderr.decode()` don't fail with `AttributeError`.
* `SnippetManagementService`: pass `self._device` (not `self`) to `Error` (a `DeviceError` subclass), and drop the unused `self._is_alive` attribute.
* `ServiceManager.list_live_services`: use a list comprehension instead of `for_each` so a pure query doesn't go through `expect_no_raises`.
* `JsonRpcShellBase`: raise `Error` instead of `assert` (which is stripped under `python -O`).
* `TestRunner.get_full_test_names`: fix broken error formatting (`Error('... %s ...', (...))` passed a 2-arg tuple to `Exception` instead of formatting the string).
@xpconanfan
xpconanfan force-pushed the android-device-fixes branch from 2afbcf8 to cc34498 Compare October 6, 2026 08:06
@xpconanfan
xpconanfan requested a review from mhaoli October 8, 2026 01:47
@xpconanfan xpconanfan self-assigned this Oct 8, 2026
@xpconanfan xpconanfan added this to the Mobly Release 1.14 milestone Oct 8, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant