summaryrefslogtreecommitdiffstats
path: root/src/report-python/test_full2
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-12-22 16:28:39 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-12-22 16:28:39 +0100
commitdba326f60e159697a740f08959d098e19c200453 (patch)
tree987b3a4f7b4f28dcf52ec0cb199a5992e5ea5e64 /src/report-python/test_full2
parent639ebf76098f56ce33d9b774acc11f4a8e60be3d (diff)
downloadabrt-dba326f60e159697a740f08959d098e19c200453.tar.gz
abrt-dba326f60e159697a740f08959d098e19c200453.tar.xz
abrt-dba326f60e159697a740f08959d098e19c200453.zip
extend run_event() to run_event_on_dir_name() and run_event_on_crash_data()
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/report-python/test_full2')
-rwxr-xr-xsrc/report-python/test_full217
1 files changed, 17 insertions, 0 deletions
diff --git a/src/report-python/test_full2 b/src/report-python/test_full2
new file mode 100755
index 00000000..734946eb
--- /dev/null
+++ b/src/report-python/test_full2
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import sys
+from report import *
+
+def log_function(line):
+ print "LOG:", line
+
+cd = crash_data()
+cd.add("foo", "bar")
+cd.add("analyzer", "baz", CD_FLAG_ISNOTEDITABLE)
+
+st = run_event_state()
+st.logging_callback = log_function
+r = st.run_event_on_crash_data(cd, "post-create")
+
+print "Result:", r