* [Buildroot] [PATCH 1/1] support/testing: add test for python-pyalsa
@ 2022-07-27 20:23 Julien Olivain
2022-07-28 21:12 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Julien Olivain @ 2022-07-27 20:23 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain
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>
---
DEVELOPERS | 2 ++
.../testing/tests/package/sample_python_pyalsa.py | 12 ++++++++++++
support/testing/tests/package/test_python_pyalsa.py | 11 +++++++++++
3 files changed, 25 insertions(+)
create mode 100644 support/testing/tests/package/sample_python_pyalsa.py
create mode 100644 support/testing/tests/package/test_python_pyalsa.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 50a295a743..cc0abef064 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1659,9 +1659,11 @@ F: package/riscv-isa-sim/
F: package/zynaddsubfx/
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_pyalsa.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_gnupg.py
+F: support/testing/tests/package/test_python_pyalsa.py
N: Julien Viard de Galbert <julien@vdg.name>
F: package/dieharder/
diff --git a/support/testing/tests/package/sample_python_pyalsa.py b/support/testing/tests/package/sample_python_pyalsa.py
new file mode 100644
index 0000000000..e22226e871
--- /dev/null
+++ b/support/testing/tests/package/sample_python_pyalsa.py
@@ -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"))
diff --git a/support/testing/tests/package/test_python_pyalsa.py b/support/testing/tests/package/test_python_pyalsa.py
new file mode 100644
index 0000000000..8046496526
--- /dev/null
+++ b/support/testing/tests/package/test_python_pyalsa.py
@@ -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"]
--
2.37.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] support/testing: add test for python-pyalsa
2022-07-27 20:23 [Buildroot] [PATCH 1/1] support/testing: add test for python-pyalsa Julien Olivain
@ 2022-07-28 21:12 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-07-28 21:12 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot
On Wed, 27 Jul 2022 22:23:07 +0200
Julien Olivain <ju.o@free.fr> wrote:
> 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>
> ---
> DEVELOPERS | 2 ++
> .../testing/tests/package/sample_python_pyalsa.py | 12 ++++++++++++
> support/testing/tests/package/test_python_pyalsa.py | 11 +++++++++++
> 3 files changed, 25 insertions(+)
> create mode 100644 support/testing/tests/package/sample_python_pyalsa.py
> create mode 100644 support/testing/tests/package/test_python_pyalsa.py
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-28 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-27 20:23 [Buildroot] [PATCH 1/1] support/testing: add test for python-pyalsa Julien Olivain
2022-07-28 21:12 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox