All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest/bbtests: Test bitbake --setscene-only option
@ 2016-02-16 15:09 Daniel Istrate
  2016-02-16 15:14 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Istrate @ 2016-02-16 15:09 UTC (permalink / raw)
  To: openembedded-core

Bitbake option to restore from sstate only within a build
(i.e. execute no real tasks, only setscene)

fix for [YOCTO #8876]

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
---
 meta/lib/oeqa/selftest/bbtests.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/meta/lib/oeqa/selftest/bbtests.py b/meta/lib/oeqa/selftest/bbtests.py
index 42ae9d0..b581b2b 100644
--- a/meta/lib/oeqa/selftest/bbtests.py
+++ b/meta/lib/oeqa/selftest/bbtests.py
@@ -232,3 +232,17 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
         self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
         self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
         self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
+
+    @testcase(1422)
+    def test_setscene_only(self):
+        """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
+        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' % task)
-- 
2.1.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] oeqa/selftest/bbtests: Test bitbake --setscene-only option
  2016-02-16 15:09 [PATCH] oeqa/selftest/bbtests: Test bitbake --setscene-only option Daniel Istrate
@ 2016-02-16 15:14 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2016-02-16 15:14 UTC (permalink / raw)
  To: Daniel Istrate, openembedded-core

On Tue, 2016-02-16 at 17:09 +0200, Daniel Istrate wrote:
> Bitbake option to restore from sstate only within a build
> (i.e. execute no real tasks, only setscene)
> 
> fix for [YOCTO #8876]
> 
> Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
> ---
>  meta/lib/oeqa/selftest/bbtests.py | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/meta/lib/oeqa/selftest/bbtests.py
> b/meta/lib/oeqa/selftest/bbtests.py
> index 42ae9d0..b581b2b 100644
> --- a/meta/lib/oeqa/selftest/bbtests.py
> +++ b/meta/lib/oeqa/selftest/bbtests.py
> @@ -232,3 +232,17 @@ SSTATE_DIR = \"${TOPDIR}/download-selftest\"
>          self.assertEqual(result.status, 0, "Bitbake failed, exit
> code %s, output %s" % (result.status, result.output))
>          self.assertFalse(os.path.isfile(os.path.join(self.builddir,
> 'tmp/deploy/licenses/readline/generic_GPLv3')))
>          self.assertTrue(os.path.isfile(os.path.join(self.builddir,
> 'tmp/deploy/licenses/readline/generic_GPLv2')))
> +
> +    @testcase(1422)
> +    def test_setscene_only(self):
> +        """ Bitbake option to restore from sstate only within a
> build (i.e. execute no real tasks, only setscene)"""
> +        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' % task)

If this fails, it would be helpful to share "tasks" in the output so we
can see which task was executed.

We've had problems with various tests where they show a failure but
without enough information to debug them.

Cheers,

Richard


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-16 15:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 15:09 [PATCH] oeqa/selftest/bbtests: Test bitbake --setscene-only option Daniel Istrate
2016-02-16 15:14 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.