remove a memory leak on schemas type facets. reduce verbosity incorporated
* relaxng.c: remove a memory leak on schemas type facets.
* check-relaxng-test-suite.py check-relaxng-test-suite2.py
check-xsddata-test-suite.py: reduce verbosity
* configure.in Makefile.am: incorporated the Python regressions
tests for Relax-NG and Schemas Datatype to "make tests"
Daniel
diff --git a/check-xsddata-test-suite.py b/check-xsddata-test-suite.py
index 2fbdc84..f2066e1 100755
--- a/check-xsddata-test-suite.py
+++ b/check-xsddata-test-suite.py
@@ -10,7 +10,8 @@
# Memory debug specific
libxml2.debugMemory(1)
debug = 0
-verbose = 1
+verbose = 0
+quiet = 1
#
# the testsuite description
@@ -119,7 +120,7 @@
instance = instance + child.serialize()
child = child.next
- mem = libxml2.debugMemory(1);
+# mem = libxml2.debugMemory(1);
try:
doc = libxml2.parseDoc(instance)
@@ -144,9 +145,9 @@
ret = -1
doc.freeDoc()
- if mem != libxml2.debugMemory(1):
- print "validating instance %d line %d leaks" % (
- nb_instances_tests, node.lineNo())
+# if mem != libxml2.debugMemory(1):
+# print "validating instance %d line %d leaks" % (
+# nb_instances_tests, node.lineNo())
if ret == 0:
log.write("\nFailed to detect validation problem in instance:\n-----\n")
@@ -338,13 +339,15 @@
msg = msg + "written by "
for author in authors:
msg = msg + author.content + " "
- print msg
+ if quiet == 0:
+ print msg
sections = node.xpathEval('section')
if verbose and sections != [] and level <= 0:
msg = ""
for section in sections:
msg = msg + section.content + " "
- print "Tests for section %s" % (msg)
+ if quiet == 0:
+ print "Tests for section %s" % (msg)
for test in node.xpathEval('testCase'):
handle_testCase(test)
for test in node.xpathEval('testSuite'):
@@ -393,12 +396,15 @@
if root.name != 'testSuite':
print "%s doesn't start with a testSuite element, aborting" % (CONF)
sys.exit(1)
-print "Running Relax NG testsuite"
+if quiet == 0:
+ print "Running Relax NG testsuite"
handle_testSuite(root)
-print "\nTOTAL:\nfound %d test schemas: %d success %d failures" % (
+if quiet == 0 or nb_schemas_failed != 0:
+ 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" % (
+if quiet == 0 or nb_instances_failed != 0:
+ print "found %d test instances: %d success %d failures" % (
nb_instances_tests, nb_instances_success, nb_instances_failed)
testsuite.freeDoc()
@@ -407,7 +413,8 @@
libxml2.relaxNGCleanupTypes()
libxml2.cleanupParser()
if libxml2.debugMemory(1) == 0:
- print "OK"
+ if quiet == 0:
+ print "OK"
else:
print "Memory leak %d bytes" % (libxml2.debugMemory(1))
libxml2.dumpMemory()