diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/bbtests.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index e9ad44b027..2a310bc4af 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py | |||
| @@ -242,6 +242,36 @@ INHERIT_remove = \"report-error\" | |||
| 242 | self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' | 242 | self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' |
| 243 | 'Executed tasks were: %s' % (task, str(tasks))) | 243 | 'Executed tasks were: %s' % (task, str(tasks))) |
| 244 | 244 | ||
| 245 | def test_skip_setscene(self): | ||
| 246 | test_recipe = 'ed' | ||
| 247 | |||
| 248 | bitbake(test_recipe) | ||
| 249 | bitbake('-c clean %s' % test_recipe) | ||
| 250 | |||
| 251 | ret = bitbake('--setscene-only %s' % test_recipe) | ||
| 252 | tasks = re.findall(r'task\s+(do_\S+):', ret.output) | ||
| 253 | |||
| 254 | for task in tasks: | ||
| 255 | self.assertIn('_setscene', task, 'A task different from _setscene ran: %s.\n' | ||
| 256 | 'Executed tasks were: %s' % (task, str(tasks))) | ||
| 257 | |||
| 258 | # Run without setscene. Should do nothing | ||
| 259 | ret = bitbake('--skip-setscene %s' % test_recipe) | ||
| 260 | tasks = re.findall(r'task\s+(do_\S+):', ret.output) | ||
| 261 | |||
| 262 | self.assertFalse(tasks, 'Tasks %s ran when they should not have' % (str(tasks))) | ||
| 263 | |||
| 264 | # Clean (leave sstate cache) and run with --skip-setscene. No setscene | ||
| 265 | # tasks should run | ||
| 266 | bitbake('-c clean %s' % test_recipe) | ||
| 267 | |||
| 268 | ret = bitbake('--skip-setscene %s' % test_recipe) | ||
| 269 | tasks = re.findall(r'task\s+(do_\S+):', ret.output) | ||
| 270 | |||
| 271 | for task in tasks: | ||
| 272 | self.assertNotIn('_setscene', task, 'A _setscene task ran: %s.\n' | ||
| 273 | 'Executed tasks were: %s' % (task, str(tasks))) | ||
| 274 | |||
| 245 | def test_bbappend_order(self): | 275 | def test_bbappend_order(self): |
| 246 | """ Bitbake should bbappend to recipe in a predictable order """ | 276 | """ Bitbake should bbappend to recipe in a predictable order """ |
| 247 | test_recipe = 'ed' | 277 | test_recipe = 'ed' |
