summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/cases/tinfoil.py14
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 c81d56d82b..4b261dad00 100644
--- a/meta/lib/oeqa/selftest/cases/tinfoil.py
+++ b/meta/lib/oeqa/selftest/cases/tinfoil.py
@@ -64,6 +64,20 @@ class TinfoilTests(OESelftestTestCase):
64 localdata.setVar('PN', 'hello') 64 localdata.setVar('PN', 'hello')
65 self.assertEqual('hello', localdata.getVar('BPN')) 65 self.assertEqual('hello', localdata.getVar('BPN'))
66 66
67 # The config_data API tp parse_recipe_file is used by:
68 # layerindex-web layerindex/update_layer.py
69 def test_parse_recipe_custom_data(self):
70 with bb.tinfoil.Tinfoil() as tinfoil:
71 tinfoil.prepare(config_only=False, quiet=2)
72 localdata = bb.data.createCopy(tinfoil.config_data)
73 localdata.setVar("TESTVAR", "testval")
74 testrecipe = 'mdadm'
75 best = tinfoil.find_best_provider(testrecipe)
76 if not best:
77 self.fail('Unable to find recipe providing %s' % testrecipe)
78 rd = tinfoil.parse_recipe_file(best[3], config_data=localdata)
79 self.assertEqual("testval", rd.getVar('TESTVAR'))
80
67 def test_list_recipes(self): 81 def test_list_recipes(self):
68 with bb.tinfoil.Tinfoil() as tinfoil: 82 with bb.tinfoil.Tinfoil() as tinfoil:
69 tinfoil.prepare(config_only=False, quiet=2) 83 tinfoil.prepare(config_only=False, quiet=2)