From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Ross Burton <ross.burton@intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/3] test-utils: handle import bb failing and skip the test
Date: Thu, 30 May 2013 20:49:13 +0100 [thread overview]
Message-ID: <1369943353.14887.327.camel@ted> (raw)
In-Reply-To: <1369334701-18752-1-git-send-email-ross.burton@intel.com>
On Thu, 2013-05-23 at 19:44 +0100, Ross Burton wrote:
> Instead of reporting an error when bb cannot be imported, skip the test
> instead. This makes it a lot easier to iterate a test suite when we don't care
> about this particular test.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> ---
> meta/lib/oe/tests/test_utils.py | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/tests/test_utils.py b/meta/lib/oe/tests/test_utils.py
> index 466c47e..779247a 100644
> --- a/meta/lib/oe/tests/test_utils.py
> +++ b/meta/lib/oe/tests/test_utils.py
> @@ -1,11 +1,15 @@
> import unittest
> -import bb, oe.utils
> +import oe.utils
>
> class TestPackagesFilterOutSystem(unittest.TestCase):
> def test_filter(self):
> """
> Test that oe.utils.packages_filter_out_system works.
> """
> + try:
> + import bb
> + except ImportError:
> + self.skipTest("Cannot import bb")
>
> d = bb.data_smart.DataSmart()
> d.setVar("PN", "foo")
This a python 2.7ism :(
For various reasons we should really add unittest from python 2.7 into
bitbake and solve this problem that way once and for all. I appreciate
that adds a hard dependency on using bitbake but OE isn't much use
without it...
Cheers,
Richard
prev parent reply other threads:[~2013-05-30 19:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 18:44 [PATCH 1/3] test-utils: handle import bb failing and skip the test Ross Burton
2013-05-23 18:45 ` [PATCH 2/3] test_utils: import functions directly for conciseness Ross Burton
2013-05-23 18:45 ` [PATCH 3/3] utils: add trim_version() function Ross Burton
2013-05-23 21:16 ` Chris Larson
2013-05-30 19:49 ` Richard Purdie [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369943353.14887.327.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox