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