summaryrefslogtreecommitdiff
path: root/meta-selftest/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta-selftest/classes')
-rw-r--r--meta-selftest/classes/test_events.bbclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/meta-selftest/classes/test_events.bbclass b/meta-selftest/classes/test_events.bbclass
new file mode 100644
index 0000000000..35324eb40b
--- /dev/null
+++ b/meta-selftest/classes/test_events.bbclass
@@ -0,0 +1,16 @@
+python test1_eventhandler() {
+ bb.note("Test for bb.event.BuildStarted")
+}
+python test2_eventhandler() {
+ bb.note("Test for bb.event.BuildCompleted")
+}
+python test3_eventhandler() {
+ bb.note("Test for bb.event.InvalidEvent")
+}
+
+addhandler test1_eventhandler
+test1_eventhandler[eventmask] = "bb.event.BuildStarted"
+addhandler test2_eventhandler
+test2_eventhandler[eventmask] = "bb.event.BuildCompleted"
+addhandler test3_eventhandler
+test3_eventhandler[eventmask] = "bb.event.InvalidEvent"