From 6da0fdade325c2ce0f371e661801e6beb1e70cdb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 15 Dec 2010 18:33:43 +0100 Subject: python wrappers: make crash_data.create_crash_dump_dir() work Signed-off-by: Denys Vlasenko --- src/report-python/test_dd_create | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/report-python/test_dd_create (limited to 'src/report-python/test_dd_create') diff --git a/src/report-python/test_dd_create b/src/report-python/test_dd_create new file mode 100644 index 00000000..0290482f --- /dev/null +++ b/src/report-python/test_dd_create @@ -0,0 +1,20 @@ +#!/usr/bin/python + +from report import * +import report + +dd = dd_create("testdir", 0) +print dd + +if dd: + print "dd is nonzero" +else: + print "dd is zero" + +print "closing" +dd.close() + +if dd: + print "dd is nonzero" +else: + print "dd is zero" -- cgit From a10b0fa6bba8218a82d634100947e084ca8d6a36 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 15 Dec 2010 18:34:37 +0100 Subject: set chmod 0755 on test progs Signed-off-by: Denys Vlasenko --- src/report-python/test_dd_create | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 src/report-python/test_dd_create (limited to 'src/report-python/test_dd_create') diff --git a/src/report-python/test_dd_create b/src/report-python/test_dd_create old mode 100644 new mode 100755 -- cgit From 27276b34e3631f60a2414ab9c199f28de9b03780 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 16 Dec 2010 04:48:22 +0100 Subject: python wrapper: trivial cleanup Signed-off-by: Denys Vlasenko --- src/report-python/test_dd_create | 1 - 1 file changed, 1 deletion(-) (limited to 'src/report-python/test_dd_create') diff --git a/src/report-python/test_dd_create b/src/report-python/test_dd_create index 0290482f..71ab8de5 100755 --- a/src/report-python/test_dd_create +++ b/src/report-python/test_dd_create @@ -1,7 +1,6 @@ #!/usr/bin/python from report import * -import report dd = dd_create("testdir", 0) print dd -- cgit From 628fb1fbae2a9e3e8fc3add070bceb5557973029 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 16 Dec 2010 18:28:07 +0100 Subject: create_dump_dir: add base_dir_name parameter. This makes python wrappers more usable. src/report-python/test_full demonstrates how pyhton programs can run reporting now. Signed-off-by: Denys Vlasenko --- src/report-python/test_dd_create | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/report-python/test_dd_create') diff --git a/src/report-python/test_dd_create b/src/report-python/test_dd_create index 71ab8de5..2ac97924 100755 --- a/src/report-python/test_dd_create +++ b/src/report-python/test_dd_create @@ -10,6 +10,7 @@ if dd: else: print "dd is zero" +print "name:", dd.name print "closing" dd.close() @@ -17,3 +18,8 @@ if dd: print "dd is nonzero" else: print "dd is zero" + +# Should fail here +dd.name = "qwe" + +print "Done" -- cgit From 3b1a9d1f8db031563903a493be755419d7ba6620 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 4 Jan 2011 16:23:21 +0100 Subject: dump_dir: make chown'ing of new files optional - needed for non-root usage Signed-off-by: Denys Vlasenko --- src/report-python/test_dd_create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/report-python/test_dd_create') diff --git a/src/report-python/test_dd_create b/src/report-python/test_dd_create index 2ac97924..4da29b11 100755 --- a/src/report-python/test_dd_create +++ b/src/report-python/test_dd_create @@ -2,7 +2,7 @@ from report import * -dd = dd_create("testdir", 0) +dd = dd_create("testdir") print dd if dd: -- cgit