[oe-commits] [openembedded-core] 12/15: oeqa: Test bitbake --skip-setsecene

git at git.openembedded.org git at git.openembedded.org
Tue Jul 2 21:02:00 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 61405584f61b8428283375867bc39c876ab5d0a8
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Mon Jul 1 13:23:06 2019 -0500

    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
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/bbtests.py | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py
index e9ad44b..2a310bc 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\"
             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'

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list