diff options
author | Chris Larson <clarson@kergoth.com> | 2003-06-17 19:08:35 +0000 |
---|---|---|
committer | Chris Larson <clarson@kergoth.com> | 2003-06-17 19:08:35 +0000 |
commit | 7045c2836819eff2a8c5ca1c8139bec027c153d9 (patch) | |
tree | cff3ed82bfc1d73307c77a2267b9d750157adf93 /test~ | |
parent | 6a169fc27b2a245265447e34c26e1979d8586b79 (diff) |
Test the new pkg events from oemake.
BKrev: 3eef6733JAqlbGu5Ff00DrRFpxbHfg
Diffstat (limited to 'test~')
-rw-r--r-- | test~/event-1.0.oe | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/test~/event-1.0.oe b/test~/event-1.0.oe index e69de29bb2..f1b133dc83 100644 --- a/test~/event-1.0.oe +++ b/test~/event-1.0.oe @@ -0,0 +1,35 @@ +python handleFail() { + from oe import expand + from oe.event import Handled, NotHandled + import os + if getattr(e, "__name__", None) == None: + name = e.__class__.__name__ + else: + name = e.__name__ + if name == "TaskFailed" or name == "TaskStarted" or name == "TaskSucceeded": + print "Caught %s event of %s" % (name, e.task) + return Handled + return NotHandled +} + +addhandler handleFail + +python PkgEvent() { + from oe import expand + from oe.event import Handled, NotHandled + import os + if getattr(e, "__name__", None) == None: + name = e.__class__.__name__ + else: + name = e.__name__ + if name == "PkgFailed" or name == "PkgStarted" or name == "PkgSucceeded": + print "Caught %s event of %s" % (name, e.pkg) + return Handled + return NotHandled +} + +addhandler PkgEvent + +do_compile() { + exit 1 +} |