diff options
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/tinfoil.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/tinfoil.py b/meta/lib/oeqa/selftest/cases/tinfoil.py index 686ce7e6b9..6668d7cdc8 100644 --- a/meta/lib/oeqa/selftest/cases/tinfoil.py +++ b/meta/lib/oeqa/selftest/cases/tinfoil.py | |||
@@ -65,6 +65,20 @@ class TinfoilTests(OESelftestTestCase): | |||
65 | localdata.setVar('PN', 'hello') | 65 | localdata.setVar('PN', 'hello') |
66 | self.assertEqual('hello', localdata.getVar('BPN')) | 66 | self.assertEqual('hello', localdata.getVar('BPN')) |
67 | 67 | ||
68 | # The config_data API tp parse_recipe_file is used by: | ||
69 | # layerindex-web layerindex/update_layer.py | ||
70 | def test_parse_recipe_custom_data(self): | ||
71 | with bb.tinfoil.Tinfoil() as tinfoil: | ||
72 | tinfoil.prepare(config_only=False, quiet=2) | ||
73 | localdata = bb.data.createCopy(tinfoil.config_data) | ||
74 | localdata.setVar("TESTVAR", "testval") | ||
75 | testrecipe = 'mdadm' | ||
76 | best = tinfoil.find_best_provider(testrecipe) | ||
77 | if not best: | ||
78 | self.fail('Unable to find recipe providing %s' % testrecipe) | ||
79 | rd = tinfoil.parse_recipe_file(best[3], config_data=localdata) | ||
80 | self.assertEqual("testval", rd.getVar('TESTVAR')) | ||
81 | |||
68 | def test_list_recipes(self): | 82 | def test_list_recipes(self): |
69 | with bb.tinfoil.Tinfoil() as tinfoil: | 83 | with bb.tinfoil.Tinfoil() as tinfoil: |
70 | tinfoil.prepare(config_only=False, quiet=2) | 84 | tinfoil.prepare(config_only=False, quiet=2) |