* [PATCH 0/1] testsdk.bbclass: check python module testools and subunit
@ 2018-07-27 3:29 Robert Yang
2018-07-27 3:29 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2018-07-27 3:29 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 364449251ffe4ff2c11acaa258edcec244c38818:
classes/package: fix variable name in comment (2018-07-26 16:55:21 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/testtools
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/testtools
Robert Yang (1):
testsdk.bbclass: check python module testools and subunit
meta/classes/testsdk.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] testsdk.bbclass: check python module testools and subunit
2018-07-27 3:29 [PATCH 0/1] testsdk.bbclass: check python module testools and subunit Robert Yang
@ 2018-07-27 3:29 ` Robert Yang
2018-07-27 8:37 ` Robert Yang
0 siblings, 1 reply; 3+ messages in thread
From: Robert Yang @ 2018-07-27 3:29 UTC (permalink / raw)
To: openembedded-core
The testools or subunit is not part of python's standard library, so check them
before use.
Fixed when they are not installed on host:
$ bitbake core-image-minimal -ctestsdk
Exception: ImportError: No module named 'testtools'
Now it can run with a warning:
WARNING: core-image-minimal-1.0-r0 do_testsdk: Failed to import testools or subunit, the testcases will run serially
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/classes/testsdk.bbclass | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 5df17bf..4f86998 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -43,6 +43,12 @@ def testsdk_main(d):
d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
+ if processes:
+ try:
+ import testools, subunit
+ except ImportError:
+ bb.warn("Failed to import testools or subunit, the testcases will run serially")
+ processes = None
sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
bb.utils.remove(sdk_dir, True)
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] testsdk.bbclass: check python module testools and subunit
2018-07-27 3:29 ` [PATCH 1/1] " Robert Yang
@ 2018-07-27 8:37 ` Robert Yang
0 siblings, 0 replies; 3+ messages in thread
From: Robert Yang @ 2018-07-27 8:37 UTC (permalink / raw)
To: openembedded-core
On 07/27/2018 11:29 AM, Robert Yang wrote:
> The testools or subunit is not part of python's standard library, so check them
> before use.
>
> Fixed when they are not installed on host:
> $ bitbake core-image-minimal -ctestsdk
> Exception: ImportError: No module named 'testtools'
>
> Now it can run with a warning:
> WARNING: core-image-minimal-1.0-r0 do_testsdk: Failed to import testools or subunit, the testcases will run serially
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/classes/testsdk.bbclass | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
> index 5df17bf..4f86998 100644
> --- a/meta/classes/testsdk.bbclass
> +++ b/meta/classes/testsdk.bbclass
> @@ -43,6 +43,12 @@ def testsdk_main(d):
> d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
>
> processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
> + if processes:
> + try:
> + import testools, subunit
> + except ImportError:
> + bb.warn("Failed to import testools or subunit, the testcases will run serially")
Sorry, typos, they should be "testtools" (lacks of a t), I fixed them in
the repo, also fixed in the commit message.
// Robert
> + processes = None
>
> sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
> bb.utils.remove(sdk_dir, True)
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-27 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 3:29 [PATCH 0/1] testsdk.bbclass: check python module testools and subunit Robert Yang
2018-07-27 3:29 ` [PATCH 1/1] " Robert Yang
2018-07-27 8:37 ` Robert Yang
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.