mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
support/testing: add test for python-pyalsa
This is a simple test importing pyalsa, showing alsa library version and attempting to list cards. Signed-off-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
64f1603bb8
commit
8c074e73b0
@@ -1660,9 +1660,11 @@ F: package/riscv-isa-sim/
|
|||||||
F: package/zynaddsubfx/
|
F: package/zynaddsubfx/
|
||||||
F: support/testing/tests/package/sample_python_distro.py
|
F: support/testing/tests/package/sample_python_distro.py
|
||||||
F: support/testing/tests/package/sample_python_gnupg.py
|
F: support/testing/tests/package/sample_python_gnupg.py
|
||||||
|
F: support/testing/tests/package/sample_python_pyalsa.py
|
||||||
F: support/testing/tests/package/test_octave.py
|
F: support/testing/tests/package/test_octave.py
|
||||||
F: support/testing/tests/package/test_python_distro.py
|
F: support/testing/tests/package/test_python_distro.py
|
||||||
F: support/testing/tests/package/test_python_gnupg.py
|
F: support/testing/tests/package/test_python_gnupg.py
|
||||||
|
F: support/testing/tests/package/test_python_pyalsa.py
|
||||||
|
|
||||||
N: Julien Viard de Galbert <julien@vdg.name>
|
N: Julien Viard de Galbert <julien@vdg.name>
|
||||||
F: package/dieharder/
|
F: package/dieharder/
|
||||||
|
|||||||
12
support/testing/tests/package/sample_python_pyalsa.py
Normal file
12
support/testing/tests/package/sample_python_pyalsa.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#! /usr/bin/env python3
|
||||||
|
|
||||||
|
from pyalsa import alsacard
|
||||||
|
|
||||||
|
print('asoundlibVersion:', alsacard.asoundlib_version())
|
||||||
|
print('cardLoad:', alsacard.card_load(0))
|
||||||
|
print('cardList:', alsacard.card_list())
|
||||||
|
print('deviceNameHint for all cards:')
|
||||||
|
print(alsacard.device_name_hint(-1, "pcm"))
|
||||||
|
for card in alsacard.card_list():
|
||||||
|
print('deviceNameHint for card #%i:' % card)
|
||||||
|
print(alsacard.device_name_hint(card, "pcm"))
|
||||||
11
support/testing/tests/package/test_python_pyalsa.py
Normal file
11
support/testing/tests/package/test_python_pyalsa.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from tests.package.test_python import TestPythonPackageBase
|
||||||
|
|
||||||
|
|
||||||
|
class TestPythonPy3PyAlsa(TestPythonPackageBase):
|
||||||
|
__test__ = True
|
||||||
|
config = TestPythonPackageBase.config + \
|
||||||
|
"""
|
||||||
|
BR2_PACKAGE_PYTHON3=y
|
||||||
|
BR2_PACKAGE_PYTHON_PYALSA=y
|
||||||
|
"""
|
||||||
|
sample_scripts = ["tests/package/sample_python_pyalsa.py"]
|
||||||
Reference in New Issue
Block a user