diff options
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/sanity.bbclass | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index d79db8f800..cf514d0c23 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
| @@ -779,20 +779,19 @@ def copy_data(e): | |||
| 779 | return sanity_data | 779 | return sanity_data |
| 780 | 780 | ||
| 781 | addhandler check_sanity_eventhandler | 781 | addhandler check_sanity_eventhandler |
| 782 | check_sanity_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.SanityCheck bb.event.NetworkTest" | 782 | check_sanity_eventhandler[eventmask] = "bb.event.SanityCheck bb.event.NetworkTest" |
| 783 | python check_sanity_eventhandler() { | 783 | python check_sanity_eventhandler() { |
| 784 | if bb.event.getName(e) == "ConfigParsed" and e.data.getVar("BB_WORKERCONTEXT", True) != "1" and e.data.getVar("DISABLE_SANITY_CHECKS", True) != "1": | 784 | if bb.event.getName(e) == "SanityCheck": |
| 785 | sanity_data = copy_data(e) | 785 | sanity_data = copy_data(e) |
| 786 | reparse = check_sanity(sanity_data) | 786 | if e.generateevents: |
| 787 | e.data.setVar("BB_INVALIDCONF", reparse) | 787 | sanity_data.setVar("SANITY_USE_EVENTS", "1") |
| 788 | elif bb.event.getName(e) == "SanityCheck": | ||
| 789 | sanity_data = copy_data(e) | ||
| 790 | sanity_data.setVar("SANITY_USE_EVENTS", "1") | ||
| 791 | reparse = check_sanity(sanity_data) | 788 | reparse = check_sanity(sanity_data) |
| 792 | e.data.setVar("BB_INVALIDCONF", reparse) | 789 | e.data.setVar("BB_INVALIDCONF", reparse) |
| 793 | bb.event.fire(bb.event.SanityCheckPassed(), e.data) | 790 | bb.event.fire(bb.event.SanityCheckPassed(), e.data) |
| 794 | elif bb.event.getName(e) == "NetworkTest": | 791 | elif bb.event.getName(e) == "NetworkTest": |
| 795 | sanity_data = copy_data(e) | 792 | sanity_data = copy_data(e) |
| 793 | if e.generateevents: | ||
| 794 | sanity_data.setVar("SANITY_USE_EVENTS", "1") | ||
| 796 | bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data) | 795 | bb.event.fire(bb.event.NetworkTestFailed() if check_connectivity(sanity_data) else bb.event.NetworkTestPassed(), e.data) |
| 797 | 796 | ||
| 798 | return | 797 | return |
