Skip to content

Test battery ID selection - #138

Merged
dymk merged 4 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/battery-id-e2e
Jul 29, 2026
Merged

dymk merged 4 commits into
OpenDevicePartnership:mainfrom
dymk:dymk/battery-id-e2e

Conversation

@dymk

@dymk dymk commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • extend the battery relay E2E to request battery IDs 0 and 1
  • assert the distinct 3S and 2S mock pack voltages end to end
  • use the merged embedded-controller and secure-services implementations

Dependencies

Validation

  • ./.husky/pre-commit
  • make ec uefi
  • make -C e2e-tests relay-run-battery SERIAL_TEE=1

Battery 0 returns 11850 mV; battery 1 returns 7900 mV.

dymk added 4 commits July 29, 2026 19:08
Stack the request-driven Battery handler with two distinct dev-QEMU fuel gauges so the relay E2E proves that battery IDs select different packs.

Assisted-by: GitHub Copilot:gpt-5.6-sol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
Advance the embedded-controller stack to include battery IDs in per-gauge error logs requested during review.

Assisted-by: GitHub Copilot:gpt-5.6-sol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
Advance the embedded-controller stack to the platform-common formatting fix required by CI.

Assisted-by: GitHub Copilot:gpt-5.6-sol

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
Replace the temporary fork pins with the merged upstream EC and secure-services commits so the E2E stack is ready for upstream review.

Assisted-by: GitHub Copilot:gpt-5.6-sol

Copilot-Session: a3539bc8-3a1f-44b3-ba4a-c171a7822595
Copilot AI review requested due to automatic review settings July 29, 2026 19:14
@dymk
dymk requested a review from a team as a code owner July 29, 2026 19:14
@dymk
dymk requested review from kat-perez, kurtjd, rogurr and tullom July 29, 2026 19:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the battery E2E test to validate battery-ID selection end-to-end by issuing GetBst requests for battery IDs 0 and 1 and asserting that the returned pack voltage differs between the two mock fuel-gauge profiles.

Changes:

  • Split the single BST assertion into two checks (battery 0 and battery 1).
  • Introduce a small helper (check_battery_bst) to share the common BST parsing/assertion logic while varying expected voltage per battery ID.
  • Improve logging/output labeling so pass/fail results are attributed to the specific battery-ID test case.

@dymk
dymk merged commit 0703741 into OpenDevicePartnership:main Jul 29, 2026
4 checks passed
@dymk
dymk deleted the dymk/battery-id-e2e branch July 30, 2026 19:47
@dymk dymk mentioned this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants