[elbe-devel] [PATCH 06/11] elbepack: test_xml: introduce custom rebuild step
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Aug 8 11:38:17 CEST 2024
"elbe check-build rebuild" requires access to the initvm.
There is no way to pass custom options to contact the initvm,
so any non-standard initvm setup will fail.
To support such non-standard setups during testing check the rebuild
through a custom unittest which is more flexible.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/tests/test_xml.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/elbepack/tests/test_xml.py b/elbepack/tests/test_xml.py
index 9bf3816502e7..2aaa76609c64 100644
--- a/elbepack/tests/test_xml.py
+++ b/elbepack/tests/test_xml.py
@@ -66,11 +66,22 @@ def simple_build(request, initvm, tmp_path_factory):
@pytest.mark.slow
- at pytest.mark.parametrize('check_build', ('schema', 'cdrom', 'img', 'sdk', 'rebuild'))
+ at pytest.mark.parametrize('check_build', ('schema', 'cdrom', 'img', 'sdk'))
def test_simple_build(simple_build, check_build):
run_elbe_subcommand(['check-build', check_build, simple_build])
+ at pytest.mark.slow
+def test_rebuild(initvm, simple_build, tmp_path_factory):
+ build_dir = tmp_path_factory.mktemp('build_dir')
+
+ initvm(
+ 'submit', '--skip-build-source',
+ '--output', build_dir,
+ simple_build / 'bin-cdrom.iso',
+ )
+
+
@pytest.mark.slow
def test_check_updates(simple_build):
run_elbe_subcommand(['check_updates', simple_build / 'source.xml'])
--
2.46.0
More information about the elbe-devel
mailing list