Skip to content

Add ALSA UCM audio tests (New)#2659

Open
seankingyang wants to merge 3 commits into
mainfrom
migrate_audio_alsa_ucm_test
Open

Add ALSA UCM audio tests (New)#2659
seankingyang wants to merge 3 commits into
mainfrom
migrate_audio_alsa_ucm_test

Conversation

@seankingyang

Copy link
Copy Markdown
Contributor

Description

Add a standalone CE OEM audio plan for ALSA UCM sink, source, and loopback validation. Include resource and template units, documentation, and unit tests for the migrated helper.
https://warthogs.atlassian.net/browse/OEMQA-6745

Resolved issues

Documentation

Tests

Add a standalone CE OEM audio plan for ALSA UCM sink, source, and loopback validation. Include resource and template units, documentation, and unit tests for the migrated helper.
@seankingyang seankingyang added the ce-oem The PR only contains to the ce-oem provider under the contrib area label Jul 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new standalone ALSA UCM audio validation plan to the CE OEM provider, including resource discovery units, templated sink/source/loopback jobs, a helper script to drive alsaucm + stream checks, and unit tests/docs to support the new workflow.

Changes:

  • Introduce a standalone ce-oem-audio-alsa-ucm test plan with bootstrap resources and templated jobs for sinks, sources, and loopback pairs.
  • Add the alsa_ucm_test.py helper (resource emission + single-device tests + loopback test) and a manifest gate (has_alsa_ucm).
  • Add documentation and unit tests for key helper behaviors (pairing parsing, resource-row building, CLI formatting, command argv builders, dispatch).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/test-plan.pxu Adds the new standalone ALSA UCM test plan and ties together bootstrap resources + templates.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/README.md Documents how to run the plan, required manifest gate, env vars, and example commands/outputs.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/manifest.pxu Introduces has_alsa_ucm manifest entry used to gate generated jobs.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/audio/alsa_ucm.pxu Defines resource units and templated jobs for sink/source/loopback validation.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/tests/test_alsa_ucm_test.py Adds unit tests for pairing/resource-row logic and command builders/dispatch.
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/alsa_ucm_test.py Adds the ALSA UCM helper CLI implementing resource emission and test execution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Switch ALSA UCM template jobs to user-interact-verify and document the required human playback and recording verification steps.
The new ce-oem-audio-alsa-ucm plan was not nested in any top-level
plan, so its tests never ran in the standard OEMQA manual pass. All
three included templates are user-interact-verify, so the plan belongs
to the manual family.

Rename the plan to ce-oem-audio-alsa-ucm-manual to match the category
naming convention, nest it in ce-oem-manual next to ce-oem-audio-manual,
and update the README reference. The also-after-suspend flags on the
templates automatically add the after-suspend variants to the session
when the originals are selected, so no separate after-suspend include
is needed.
@seankingyang

seankingyang commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Verification evidence for commit 5b5972c19 (rename ce-oem-audio-alsa-ucmce-oem-audio-alsa-ucm-manual + nesting in ce-oem-manual): checkbox-cli list-bootstrapped run locally against this branch, on a dev box that has a sof-soundwire card — so the templates expand into real generated jobs.

Results

  • The renamed nested plan resolves: no unable to find nested part: …alsa-ucm-manual in the output (the ce-oem-caam-manual one is pre-existing and unrelated).
  • The ce-oem-manual run list now contains the ALSA UCM jobs, e.g. com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-Speaker and the …-source-…-Mic variants (loopback expands to zero here because ALSA_UCM_LOOPBACK_PAIRING is unset — expected).
  • The also-after-suspend flags work as designed with no extra wiring: the after-suspend siblings (after-suspend-ce-oem-audio/alsa-ucm-*) plus their suspend/suspend_advanced_auto dependency are added to the run list automatically when the originals are selected (checkbox-ng SessionState._add_job_siblings_unit).
  • manage.py validate on the provider: "The provider seems to be valid", zero error: lines.

Command

PROVIDERPATH=<providers.d from this branch> checkbox-cli list-bootstrapped --normal-user <user> com.canonical.contrib::ce-oem-manual
Full list-bootstrapped log
com.canonical.plainbox::manifest
com.canonical.contrib::ce-oem-location/gps_coordinate
com.canonical.contrib::ce-oem-buzzer/input-pcspkr
com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI1
com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI3
com.canonical.contrib::ce-oem/cash-drawer-test
com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-Headphones
com.canonical.certification::sleep
com.canonical.certification::package
com.canonical.contrib::ce-oem/printer-test
com.canonical.certification::cpuinfo
com.canonical.contrib::ce-oem-otg/g_serial-MISSING_PARAM_1
com.canonical.contrib::ce-oem-audio/alsa-ucm-source-sofsoundwire-HiFi-Mic
com.canonical.contrib::ce-oem-otg/g_mass_storage-MISSING_PARAM_1
com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-Speaker
com.canonical.contrib::ce-oem/barcode-scanner-test
com.canonical.certification::rtc
com.canonical.contrib::ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI2
com.canonical.contrib::ce-oem-otg/g_ether-MISSING_PARAM_1
com.canonical.contrib::ce-oem-audio/alsa-ucm-source-sofsoundwire-HiFi-Headset
com.canonical.certification::suspend/suspend_advanced_auto
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI1
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI2
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-HDMI3
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-Headphones
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-sink-sofsoundwire-HiFi-Speaker
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-source-sofsoundwire-HiFi-Headset
com.canonical.contrib::after-suspend-ce-oem-audio/alsa-ucm-source-sofsoundwire-HiFi-Mic
com.canonical.certification::lsb
com.canonical.certification::bootloader
com.canonical.contrib::ce-oem-secure-boot/uefi-secure-boot-unsigned-kernel
# exit=0

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

Labels

ce-oem The PR only contains to the ce-oem provider under the contrib area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants