diff options
| author | hathach <[email protected]> | 2026-06-18 17:09:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-06-18 17:15:50 +0700 |
| commit | 8d6e3c2dcd6902f834df9eed4d8e2d582dace673 (patch) | |
| tree | eeb3ec21c3ba8a71bb569e7a975d663d428af71c | |
| parent | 941d63e39a529593ee86caf7ea85e04839680d59 (diff) | |
test/hil: fail audio test on missing alsa-utils instead of skipping
arecord (alsa-utils) is a documented HIL host requirement, like
mtools/libmtp9/iperf — none of which have a skip-if-missing guard. The
audio test was the exception: it silently returned 'skipped' when arecord
was absent, masking host misconfiguration. The ci.lan rig had been
silently skipping device/audio_test_freertos on every board because
alsa-utils was never installed.
Remove the shutil.which('arecord') guard so a missing package surfaces as
a failure, consistent with the other tool-dependent tests, and drop the
now-unused shutil import. Note in the host-setup comment that these
packages are required (a missing tool fails its test rather than skipping).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
| -rwxr-xr-x | test/hil/hil_test.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 8ae9ee0dc..055618e3c 100755 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -22,7 +22,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -# Host setup: +# Host setup (required: a missing tool fails its test rather than skipping it): # - System packages: sudo apt install mtools libmtp9 alsa-utils iperf # mtools - read_disk_file (device/cdc_msc, device/msc_dual_lun) # libmtp9 - pymtp ctypes load (device/mtp); Debian 13 uses libmtp9t64 @@ -51,7 +51,6 @@ import serial import subprocess import json import glob -import shutil from multiprocessing import Pool, Lock from multiprocessing import TimeoutError as MpTimeoutError import hashlib @@ -1380,10 +1379,6 @@ def test_device_audio_test_freertos(board): if os.name == 'nt': return 'skipped' - arecord = shutil.which('arecord') - if arecord is None: - return 'skipped' - pcm = None timeout = ENUM_TIMEOUT while timeout > 0: @@ -1397,7 +1392,7 @@ def test_device_audio_test_freertos(board): raw_path = f'/tmp/tinyusb_audio_{uid}.raw' cmd = [ - arecord, + 'arecord', '-D', pcm, '-q', '-f', 'S16_LE', |
