Patchwork [1/2] sanity.bbclass: trigger network tests explicitly

login
register
mail settings
Submitter Bogdan Marinescu
Date Oct. 11, 2012, 11:44 a.m.
Message ID <1349955886-6399-1-git-send-email-bogdan.a.marinescu@intel.com>
Download mbox | patch
Permalink /patch/38083/
State Accepted
Commit a3720a51c9578bb70773accf0985d61cf1e05f6e
Headers show

Comments

Bogdan Marinescu - Oct. 11, 2012, 11:44 a.m.
The network tests in sanity.bbclass can now be trigerred explicitly
by firing the NetworkTest event. This is part of the fix for bug #3026.

[YOCTO #3026]

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
---
 meta/classes/sanity.bbclass |    3 +++
 1 file changed, 3 insertions(+)
Saul Wold - Oct. 18, 2012, 8:16 p.m.
On 10/11/2012 04:44 AM, Bogdan Marinescu wrote:
> The network tests in sanity.bbclass can now be trigerred explicitly
> by firing the NetworkTest event. This is part of the fix for bug #3026.
>
> [YOCTO #3026]
>
> Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
> ---
>   meta/classes/sanity.bbclass |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index f2e9a74..3806bc5 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -639,6 +639,9 @@ python check_sanity_eventhandler() {
>           sanity_data.setVar("SANITY_USE_EVENTS", "1")
>           check_sanity(sanity_data)
>           bb.event.fire(bb.event.SanityCheckPassed(), e.data)
> +    elif bb.event.getName(e) == "NetworkTest":
> +        sanity_data = copy_data(e)
> +        bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data)
>
>       return
>   }
>
Merged into OE-Core

Thanks
	Sau!

Patch

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index f2e9a74..3806bc5 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -639,6 +639,9 @@  python check_sanity_eventhandler() {
         sanity_data.setVar("SANITY_USE_EVENTS", "1")
         check_sanity(sanity_data)
         bb.event.fire(bb.event.SanityCheckPassed(), e.data)
+    elif bb.event.getName(e) == "NetworkTest":
+        sanity_data = copy_data(e)
+        bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data)
 
     return
 }