* [Buildroot] [git commit] support/testing: add test for python-distro
@ 2022-02-12 12:55 Arnout Vandecappelle
0 siblings, 0 replies; only message in thread
From: Arnout Vandecappelle @ 2022-02-12 12:55 UTC (permalink / raw)
To: buildroot
commit: https://git.buildroot.net/buildroot/commit/?id=ebde11d29f5ceb7f7398d24cbf71909c1e08a073
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
This commit add a simple test checking the reported distro name and
id are Buildroot (as reported by /etc/os-release).
Signed-off-by: Julien Olivain <ju.o@free.fr>
[Arnout: drop python2 variant]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
DEVELOPERS | 2 ++
support/testing/tests/package/sample_python_distro.py | 4 ++++
support/testing/tests/package/test_python_distro.py | 11 +++++++++++
3 files changed, 17 insertions(+)
diff --git a/DEVELOPERS b/DEVELOPERS
index 689673fce7..e89149cea0 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1604,7 +1604,9 @@ F: package/python-gnupg/
F: package/python-pyalsa/
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/test_python_distro.py
F: support/testing/tests/package/test_python_gnupg.py
N: Julien Viard de Galbert <julien@vdg.name>
diff --git a/support/testing/tests/package/sample_python_distro.py b/support/testing/tests/package/sample_python_distro.py
new file mode 100644
index 0000000000..b31f129718
--- /dev/null
+++ b/support/testing/tests/package/sample_python_distro.py
@@ -0,0 +1,4 @@
+import distro
+
+assert(distro.name() == 'Buildroot')
+assert(distro.id() == 'buildroot')
diff --git a/support/testing/tests/package/test_python_distro.py b/support/testing/tests/package/test_python_distro.py
new file mode 100644
index 0000000000..c26f9c499e
--- /dev/null
+++ b/support/testing/tests/package/test_python_distro.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Distro(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_DISTRO=y
+ """
+ sample_scripts = ["tests/package/sample_python_distro.py"]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-12 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12 12:55 [Buildroot] [git commit] support/testing: add test for python-distro Arnout Vandecappelle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.