Skip to contentSkip to conversation

sanity.bbclass: trigger network tests explicitly

PATCH Applied Bogdan Marinescu 2 participants 2 messages Oct 11, 2012 – Oct 18, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 sanity.bbclass: trigger network tests explicitly

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]

---
 meta/classes/sanity.bbclass |    3 +++
 1 file changed, 3 insertions(+)
meta/classes/sanity.bbclass +3 -0
index f2e9a74..3806bc5 100644
@@ -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
 }
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 16 lines · Bogdan Marinescu

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]

---
  meta/classes/sanity.bbclass |    3 +++
  1 file changed, 3 insertions(+)
meta/classes/sanity.bbclass +0 -0
index f2e9a74..3806bc5 100644

meta/classes/sanity.bbclass python check_sanity_eventhandler() { · line 647

Quoted 9 lines
meta/classes/sanity.bbclass +3 -0
@@ -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!