support/testing: add test for python-distro
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>
This commit is contained in:
parent
59d3a1a999
commit
ebde11d29f
@ -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>
|
||||
|
4
support/testing/tests/package/sample_python_distro.py
Normal file
4
support/testing/tests/package/sample_python_distro.py
Normal file
@ -0,0 +1,4 @@
|
||||
import distro
|
||||
|
||||
assert(distro.name() == 'Buildroot')
|
||||
assert(distro.id() == 'buildroot')
|
11
support/testing/tests/package/test_python_distro.py
Normal file
11
support/testing/tests/package/test_python_distro.py
Normal file
@ -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"]
|
Loading…
Reference in New Issue
Block a user