aboutsummaryrefslogtreecommitdiffstats
path: root/check-relaxng-test-suite.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-02-24 17:17:58 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-02-24 17:17:58 +0000
commit3ebc7d43f73d67c54cc0ec1d3ca0aa1e4115f519 (patch)
treec9c6600955f190fc2f87fa0c3f0c3d443cd6b9fd /check-relaxng-test-suite.py
parentc64b8e984c13a0d989dea436c13128b289a4d4d6 (diff)
downloadandroid_external_libxml2-3ebc7d43f73d67c54cc0ec1d3ca0aa1e4115f519.tar.gz
android_external_libxml2-3ebc7d43f73d67c54cc0ec1d3ca0aa1e4115f519.tar.bz2
android_external_libxml2-3ebc7d43f73d67c54cc0ec1d3ca0aa1e4115f519.zip
fixed xmlSetProp and al. when the node passed is not an element. fixed
* tree.c: fixed xmlSetProp and al. when the node passed is not an element. * relaxng.c: fixed bugs 7.3 (though not complete) and memory leaks found 373 test schemas: 369 success 4 failures found 529 test instances: 525 success 4 failures * check-relaxng-test-suite.py: added memory debug reporting Daniel
Diffstat (limited to 'check-relaxng-test-suite.py')
-rwxr-xr-xcheck-relaxng-test-suite.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py
index 5363a818..6f65264a 100755
--- a/check-relaxng-test-suite.py
+++ b/check-relaxng-test-suite.py
@@ -7,6 +7,8 @@ import StringIO
sys.path.append("python")
import libxml2
+# Memory debug specific
+libxml2.debugMemory(1)
debug = 0
#
@@ -97,6 +99,7 @@ def handle_valid(node, schema):
nb_instances_failed = nb_instances_failed + 1
else:
nb_instances_success = nb_instances_success + 1
+ doc.freeDoc()
#
# handle an invalid instance
@@ -136,6 +139,7 @@ def handle_invalid(node, schema):
nb_instances_failed = nb_instances_failed + 1
else:
nb_instances_success = nb_instances_success + 1
+ doc.freeDoc()
#
# handle an incorrect test
@@ -364,3 +368,14 @@ print "\nTOTAL:\nfound %d test schemas: %d success %d failures" % (
nb_schemas_tests, nb_schemas_success, nb_schemas_failed)
print "found %d test instances: %d success %d failures" % (
nb_instances_tests, nb_instances_success, nb_instances_failed)
+
+testsuite.freeDoc()
+
+# Memory debug specific
+libxml2.relaxNGCleanupTypes()
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()