osbuild: auto-detect best available runner
Use the new `Index.detect_runner` method that will give us the best available runner for a requested one. To do so a new `pipeline.Runner` class is introduced that stores the `meta.RunnerInfo` class for the specific runner and the original name that was requested. In the manifest loading and describing functions of the formats, use `Index.detect_runner` to get the `RunnerInfo` for a requested runner and then wrap it in a `pipeline.Runner` object, which is then passed to the `Manifest.add_pipeline` method. See also commit "meta: ability to auto-detect runner". Adjust all test.
This commit is contained in:
parent
0554ac652b
commit
5bdc8d030c
8 changed files with 71 additions and 43 deletions
|
|
@ -212,13 +212,13 @@ class TestFormatV2(unittest.TestCase):
|
|||
self.assertIsNotNone(tree)
|
||||
self.assertIsNotNone(tree.build)
|
||||
self.assertEqual(tree.build, build.id)
|
||||
self.assertEqual(tree.runner, "org.osbuild.linux")
|
||||
self.assertEqual(tree.runner.name, "org.osbuild.linux")
|
||||
|
||||
assembler = manifest["assembler"]
|
||||
self.assertIsNotNone(assembler)
|
||||
self.assertIsNotNone(assembler.build)
|
||||
self.assertEqual(assembler.build, build.id)
|
||||
self.assertEqual(assembler.runner, "org.osbuild.linux")
|
||||
self.assertEqual(assembler.runner.name, "org.osbuild.linux")
|
||||
|
||||
def test_format_info(self):
|
||||
index = self.index
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue