[elbe-devel] [PATCH 2/4] tests: add a test for the pbuilder repository
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 19 14:17:44 CEST 2024
Test that "prjbuild list_packages" works and that packages from pbuilder
are correctly added to that repository.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/test_xml.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
index 26e32edc0cd7..c1c3200b4360 100644
--- a/elbepack/tests/test_xml.py
+++ b/elbepack/tests/test_xml.py
@@ -72,9 +72,20 @@ def test_pbuilder_build(initvm, xml, tmp_path, request):
uuid = prj.read_text()
request.addfinalizer(lambda: _delete_project(uuid))
+ ps = run_elbe(['prjrepo', 'list_packages', uuid], check=True, capture_output=True)
+ assert ps.stdout == b''
+
for package in ['libgpio', 'gpiotest']:
subprocess.run(['git', 'clone', f'https://github.com/Linutronix/{package}.git'],
check=True, cwd=build_dir)
run_elbe(['pbuilder', 'build', '--project', uuid,
'--source', build_dir.joinpath(package), '--output', build_dir.joinpath('out')],
check=True)
+
+ ps = run_elbe(['prjrepo', 'list_packages', uuid], check=True, capture_output=True)
+ assert ps.stdout == (
+ b'gpiotest_1.0_amd64.deb\n'
+ b'libgpio-dev_3.0.0_amd64.deb\n'
+ b'libgpio1-dbgsym_3.0.0_amd64.deb\n'
+ b'libgpio1_3.0.0_amd64.deb\n'
+ )
--
2.45.2
More information about the elbe-devel
mailing list