oeqa: Test bitbake --skip-setsecene
PATCH 1/1 oeqa: Test bitbake --skip-setsecene
Tests the bitbake --skip-setscene option to verify that it correctly reuses tasks previously restored from sstate, but doesn't execute new sstate tasks
--- meta/lib/oeqa/selftest/cases/bbtests.py | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
meta/lib/oeqa/selftest/cases/bbtests.py +30 -0
@@ -242,6 +242,36 @@ INHERIT_remove = \"report-error\" self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' 'Executed tasks were: %s' % (task, str(tasks))) + def test_skip_setscene(self): + test_recipe = 'ed' + + bitbake(test_recipe) + bitbake('-c clean %s' % test_recipe) + + ret = bitbake('--setscene-only %s' % test_recipe) + tasks = re.findall(r'task\s+(do_\S+):', ret.output) + + for task in tasks: + self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' + 'Executed tasks were: %s' % (task, str(tasks))) + + # Run without setscene. Should do nothing + ret = bitbake('--skip-setscene %s' % test_recipe) + tasks = re.findall(r'task\s+(do_\S+):', ret.output) + + self.assertFalse(tasks, 'Tasks %s ran when they should not have' % (str(tasks))) + + # Clean (leave sstate cache) and run with --skip-setscene. No setscene + # tasks should run + bitbake('-c clean %s' % test_recipe) + + ret = bitbake('--skip-setscene %s' % test_recipe) + tasks = re.findall(r'task\s+(do_\S+):', ret.output) + + for task in tasks: + self.assertNotIn('_setscene', task, 'A _setscene task ran: %s.\n' + 'Executed tasks were: %s' % (task, str(tasks))) + def test_bbappend_order(self): """ Bitbake should bbappend to recipe in a predictable order """ test_recipe = 'ed'
Signature · 1 line
2.21.0
Quoted 9 lines · Joshua Watt
Tests the bitbake --skip-setscene option to verify that it correctly reuses tasks previously restored from sstate, but doesn't execute new sstate tasks
Signed-off-by Joshua Watt <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
I like the idea but unfortunately it doesn't pass:
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/267
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/265
Cheers,
Richard
Quoted 10 lines · Richard Purdie
Quoted 9 lines · Joshua Watt
Tests the bitbake --skip-setscene option to verify that it correctly reuses tasks previously restored from sstate, but doesn't execute new sstate tasks
Signed-off-by Joshua Watt <[email protected]>--- meta/lib/oeqa/selftest/cases/bbtests.py | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Quoted 4 lines
I like the idea but unfortunately it doesn't pass:
https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/267
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/265
I think it failed because http://lists.openembedded.org/pipermail/bitbake-devel/2019-July/020105.html is not in master-next of bitbake? I split the bitbake change and the oeqa change to test it into separate patches.
Quoted 6 lines
Cheers,
Richard