diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2004-03-22 19:10:02 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2004-03-22 19:10:02 +0000 |
commit | 6dc91962d072fd434fec4673e9e4f2201a99df86 (patch) | |
tree | b7e2a3faa7c11f10626af75b65984127aa96e346 /check-xsddata-test-suite.py | |
parent | 500a1de533e2ea03f452844f537bb247b7e43af2 (diff) | |
download | android_external_libxml2-6dc91962d072fd434fec4673e9e4f2201a99df86.tar.gz android_external_libxml2-6dc91962d072fd434fec4673e9e4f2201a99df86.tar.bz2 android_external_libxml2-6dc91962d072fd434fec4673e9e4f2201a99df86.zip |
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
Diffstat (limited to 'check-xsddata-test-suite.py')
-rwxr-xr-x | check-xsddata-test-suite.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/check-xsddata-test-suite.py b/check-xsddata-test-suite.py index 2fbdc840..f2066e1b 100755 --- a/check-xsddata-test-suite.py +++ b/check-xsddata-test-suite.py @@ -10,7 +10,8 @@ import libxml2 # Memory debug specific libxml2.debugMemory(1) debug = 0 -verbose = 1 +verbose = 0 +quiet = 1 # # the testsuite description @@ -119,7 +120,7 @@ def handle_invalid(node, schema): instance = instance + child.serialize() child = child.next - mem = libxml2.debugMemory(1); +# mem = libxml2.debugMemory(1); try: doc = libxml2.parseDoc(instance) @@ -144,9 +145,9 @@ def handle_invalid(node, schema): 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 @@ def handle_testSuite(node, level = 0): 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 @@ root = testsuite.getRootElement() 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 @@ testsuite.freeDoc() 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() |