summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>2016-02-19 12:17:54 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-30 12:01:29 +0100
commitabb5b46ca3af3b886487799c6216eb660e860f41 (patch)
tree4988e1d731af352133447de2a787541a7d815044
parentddbeb56f4fb69831453f4b91f5410ba4fde9fa56 (diff)
downloadpoky-abb5b46ca3af3b886487799c6216eb660e860f41.tar.gz
oeqa/selftest/bbtests: Test bbappend order
BitBake should append to recipe in a predictable order. fix for [YOCTO #9145] test for [YOCTO #9138] (From OE-Core rev: 51bef86ce52fdc2455cd1879e3e19d5ccc5c1c9c) Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/bbtests.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 70e5b29218..26728a4b41 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -247,3 +247,26 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
247 for task in tasks: 247 for task in tasks:
248 self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' 248 self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n'
249 'Executed tasks were: %s' % (task, str(tasks))) 249 'Executed tasks were: %s' % (task, str(tasks)))
250
251 @testcase(1425)
252 def test_bbappend_order(self):
253 """ Bitbake should bbappend to recipe in a predictable order """
254 test_recipe = 'ed'
255 test_recipe_summary_before = get_bb_var('SUMMARY', test_recipe)
256 test_recipe_pv = get_bb_var('PV', test_recipe)
257 recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
258 expected_recipe_summary = test_recipe_summary_before
259
260 for i in range(5):
261 recipe_append_dir = test_recipe + '_test_' + str(i)
262 recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir, recipe_append_file)
263 os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir))
264 feature = 'SUMMARY += "%s"\n' % i
265 ftools.write_file(recipe_append_path, feature)
266 expected_recipe_summary += ' %s' % i
267
268 self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test',
269 test_recipe + '_test_*'))
270
271 test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
272 self.assertEqual(expected_recipe_summary, test_recipe_summary_after)