Repository navigation
test: bats suite for lib/audio-utils.sh + CI workflow - #23
Conversation
28 tests over the shared library using PATH-prepended command stubs and canned aplay/wpctl/pactl fixtures: card-priority ordering (USB > HAT > headphones > HDMI), USB card picking, wpctl/pactl sink parsing and card-to-sink mapping, udev env var extraction, i2c_platform hint handling and sound-server detection.
|
Warning Review limit reached
Next review available in: 31 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
test/audio-utils.bats: 28 bats-core tests that sourcelib/audio-utils.shwith mocked commands (PATH-prepended stubs intest/stubs/, canned output intest/fixtures/):aplay -lparsing: card lookup, USB picking (single / multiple-last-wins-with-warning / none)*default marker), card-index→sink-ID mapping, node.name lookup incl. rc-1 missDEVPATH/DEVNAME/absent) andi2c_platformhint handlingdetect_sound_serverin a controlled PATH: running-server preference, install fallbacks, and the graceful no-server error path.github/workflows/test.yml: runsbats test/on ubuntu-latest (apt bats).Injected-defect proof
Deliberately swapping the headphones/HDMI tiers inside
select_fallback_cardmakes tests 8 ("headphones win when only onboard cards are present") and 9 ("HDMI is the last resort") fail; restoring the lib returns the suite to 28/28 green. The suite genuinely pins the priority order.🤖 Generated with Claude Code