diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-02-14 16:54:11 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-02-14 16:54:11 +0000 |
commit | d2298791af5f9104e5cbd9f58c731f2116195bcd (patch) | |
tree | e72a30bc5b26b9971eae0e2bcc108787f85eefef /check-relaxng-test-suite.py | |
parent | 9a237c9d2663e3bc5278c948aae3e6fdb59f80e0 (diff) | |
download | android_external_libxml2-d2298791af5f9104e5cbd9f58c731f2116195bcd.tar.gz android_external_libxml2-d2298791af5f9104e5cbd9f58c731f2116195bcd.tar.bz2 android_external_libxml2-d2298791af5f9104e5cbd9f58c731f2116195bcd.zip |
more testing on the Relax-NG front, cleaning up the regression tests
* check-relaxng-test-suite.py relaxng.c: more testing on the
Relax-NG front, cleaning up the regression tests failures
current state and I forgot support for "mixed":
found 373 test schemas: 280 success 93 failures
found 529 test instances: 401 success 68 failures
* tree.c include/libxml/tree.h xmlschemastypes.c: finished and
moved the Name, NCName and QName validation routine in tree.c
* uri.c: fixed handling of URI ending up with #, i.e. having
an empty fragment ID.
* result/relaxng/*: updated the results
Daniel
Diffstat (limited to 'check-relaxng-test-suite.py')
-rwxr-xr-x | check-relaxng-test-suite.py | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/check-relaxng-test-suite.py b/check-relaxng-test-suite.py index feb68174..00fe9025 100755 --- a/check-relaxng-test-suite.py +++ b/check-relaxng-test-suite.py @@ -45,7 +45,6 @@ def resolver(URL, ID, ctxt): log.write("resources: %s\n" % (resources)) return None -libxml2.setEntityLoader(resolver) # # handle a valid instance @@ -235,7 +234,6 @@ def handle_dir(node, dir): for r in res: handle_resource(r, name) - # # handle a testCase element # @@ -285,7 +283,17 @@ def handle_testCase(node): # # handle a testSuite element # -def handle_testSuite(node): +def handle_testSuite(node, level = 0): + global nb_schemas_tests, nb_schemas_success, nb_schemas_failed + global nb_instances_tests, nb_instances_success, nb_instances_failed + if level >= 1: + old_schemas_tests = nb_schemas_tests + old_schemas_success = nb_schemas_success + old_schemas_failed = nb_schemas_failed + old_instances_tests = nb_instances_tests + old_instances_success = nb_instances_success + old_instances_failed = nb_instances_failed + docs = node.xpathEval('documentation') authors = node.xpathEval('author') if docs != []: @@ -306,13 +314,26 @@ def handle_testSuite(node): for test in node.xpathEval('testCase'): handle_testCase(test) for test in node.xpathEval('testSuite'): - handle_testSuite(test) + handle_testSuite(test, level + 1) + if level >= 1 and sections != []: + if nb_schemas_tests != old_schemas_tests: + print "found %d test schemas: %d success %d failures" % ( + nb_schemas_tests - old_schemas_tests, + nb_schemas_success - old_schemas_success, + nb_schemas_failed - old_schemas_failed) + if nb_instances_tests != old_instances_tests: + print "found %d test instances: %d success %d failures" % ( + nb_instances_tests - old_instances_tests, + nb_instances_success - old_instances_success, + nb_instances_failed - old_instances_failed) # # Parse the conf file # +libxml2.substituteEntitiesDefault(1); testsuite = libxml2.parseFile(CONF) +libxml2.setEntityLoader(resolver) root = testsuite.getRootElement() if root.name != 'testSuite': print "%s doesn't start with a testSuite element, aborting" % (CONF) |