Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 1 | #!/usr/bin/python |
| 2 | import sys |
Daniel Veillard | 878eab0 | 2002-02-19 13:46:09 +0000 | [diff] [blame] | 3 | import time |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 4 | import os |
| 5 | import string |
| 6 | sys.path.append("python") |
| 7 | import libxml2 |
| 8 | |
| 9 | # |
| 10 | # the testsuite description |
| 11 | # |
| 12 | CONF="xml-test-suite/xmlconf/xmlconf.xml" |
| 13 | LOG="check-xml-test-suite.log" |
| 14 | |
| 15 | log = open(LOG, "w") |
| 16 | |
| 17 | # |
| 18 | # Error and warning handlers |
| 19 | # |
| 20 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 21 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 22 | def errorHandler(ctx, str): |
| 23 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 24 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 25 | |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 26 | error_nr = error_nr + 1 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 27 | if len(error_msg) < 300: |
| 28 | if len(error_msg) == 0 or error_msg[-1] == '\n': |
| 29 | error_msg = error_msg + " >>" + str |
| 30 | else: |
| 31 | error_msg = error_msg + str |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 32 | |
| 33 | libxml2.registerErrorHandler(errorHandler, None) |
| 34 | |
| 35 | #warning_nr = 0 |
| 36 | #warning = '' |
| 37 | #def warningHandler(ctx, str): |
| 38 | # global warning_nr |
| 39 | # global warning |
| 40 | # |
| 41 | # warning_nr = warning_nr + 1 |
| 42 | # warning = warning + str |
| 43 | # |
| 44 | #libxml2.registerWarningHandler(warningHandler, None) |
| 45 | |
| 46 | # |
| 47 | # Used to load the XML testsuite description |
| 48 | # |
| 49 | def loadNoentDoc(filename): |
| 50 | ctxt = libxml2.createFileParserCtxt(filename) |
| 51 | if ctxt == None: |
| 52 | return None |
| 53 | ctxt.replaceEntities(1) |
| 54 | ctxt.parseDocument() |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 55 | try: |
| 56 | doc = ctxt.doc() |
| 57 | except: |
| 58 | doc = None |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 59 | if ctxt.wellFormed() != 1: |
| 60 | doc.freeDoc() |
| 61 | return None |
| 62 | return doc |
| 63 | |
| 64 | # |
| 65 | # The conformance testing routines |
| 66 | # |
| 67 | |
| 68 | def testNotWf(filename, id): |
| 69 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 70 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 71 | global log |
| 72 | |
| 73 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 74 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 75 | |
| 76 | ctxt = libxml2.createFileParserCtxt(filename) |
| 77 | if ctxt == None: |
| 78 | return -1 |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 79 | ret = ctxt.parseDocument() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 80 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 81 | try: |
| 82 | doc = ctxt.doc() |
| 83 | except: |
| 84 | doc = None |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 85 | if doc != None: |
| 86 | doc.freeDoc() |
| 87 | if ret == 0 or ctxt.wellFormed() != 0: |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 88 | print "%s: error: Well Formedness error not detected" % (id) |
| 89 | log.write("%s: error: Well Formedness error not detected\n" % (id)) |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 90 | return 0 |
| 91 | return 1 |
| 92 | |
| 93 | def testNotWfEnt(filename, id): |
| 94 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 95 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 96 | global log |
| 97 | |
| 98 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 99 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 100 | |
| 101 | ctxt = libxml2.createFileParserCtxt(filename) |
| 102 | if ctxt == None: |
| 103 | return -1 |
| 104 | ctxt.replaceEntities(1) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 105 | ret = ctxt.parseDocument() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 106 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 107 | try: |
| 108 | doc = ctxt.doc() |
| 109 | except: |
| 110 | doc = None |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 111 | if doc != None: |
| 112 | doc.freeDoc() |
| 113 | if ret == 0 or ctxt.wellFormed() != 0: |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 114 | print "%s: error: Well Formedness error not detected" % (id) |
| 115 | log.write("%s: error: Well Formedness error not detected\n" % (id)) |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 116 | return 0 |
| 117 | return 1 |
| 118 | |
| 119 | def testNotWfEntDtd(filename, id): |
| 120 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 121 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 122 | global log |
| 123 | |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 124 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 125 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 126 | |
| 127 | ctxt = libxml2.createFileParserCtxt(filename) |
| 128 | if ctxt == None: |
| 129 | return -1 |
| 130 | ctxt.replaceEntities(1) |
| 131 | ctxt.loadSubset(1) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 132 | ret = ctxt.parseDocument() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 133 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 134 | try: |
| 135 | doc = ctxt.doc() |
| 136 | except: |
| 137 | doc = None |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 138 | if doc != None: |
| 139 | doc.freeDoc() |
| 140 | if ret == 0 or ctxt.wellFormed() != 0: |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 141 | print "%s: error: Well Formedness error not detected" % (id) |
| 142 | log.write("%s: error: Well Formedness error not detected\n" % (id)) |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 143 | return 0 |
| 144 | return 1 |
| 145 | |
| 146 | def testWfEntDtd(filename, id): |
| 147 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 148 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 149 | global log |
| 150 | |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 151 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 152 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 153 | |
| 154 | ctxt = libxml2.createFileParserCtxt(filename) |
| 155 | if ctxt == None: |
| 156 | return -1 |
| 157 | ctxt.replaceEntities(1) |
| 158 | ctxt.loadSubset(1) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 159 | ret = ctxt.parseDocument() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 160 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 161 | try: |
| 162 | doc = ctxt.doc() |
| 163 | except: |
| 164 | doc = None |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 165 | if doc == None or ret != 0 or ctxt.wellFormed() == 0: |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 166 | print "%s: error: wrongly failed to parse the document" % (id) |
| 167 | log.write("%s: error: wrongly failed to parse the document\n" % (id)) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 168 | if doc != None: |
| 169 | doc.freeDoc() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 170 | return 0 |
| 171 | if error_nr != 0: |
| 172 | print "%s: warning: WF document generated an error msg" % (id) |
| 173 | log.write("%s: error: WF document generated an error msg\n" % (id)) |
| 174 | doc.freeDoc() |
| 175 | return 2 |
| 176 | doc.freeDoc() |
| 177 | return 1 |
| 178 | |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 179 | def testError(filename, id): |
| 180 | global error_nr |
| 181 | global error_msg |
| 182 | global log |
| 183 | |
| 184 | error_nr = 0 |
| 185 | error_msg = '' |
| 186 | |
| 187 | ctxt = libxml2.createFileParserCtxt(filename) |
| 188 | if ctxt == None: |
| 189 | return -1 |
| 190 | ctxt.replaceEntities(1) |
| 191 | ctxt.loadSubset(1) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 192 | ret = ctxt.parseDocument() |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 193 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 194 | try: |
| 195 | doc = ctxt.doc() |
| 196 | except: |
| 197 | doc = None |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 198 | if doc != None: |
| 199 | doc.freeDoc() |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 200 | if ctxt.wellFormed() == 0: |
| 201 | print "%s: warning: failed to parse the document but accepted" % (id) |
| 202 | log.write("%s: warning: failed to parse the document but accepte\n" % (id)) |
| 203 | return 2 |
| 204 | if error_nr != 0: |
| 205 | print "%s: warning: WF document generated an error msg" % (id) |
| 206 | log.write("%s: error: WF document generated an error msg\n" % (id)) |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 207 | return 2 |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 208 | return 1 |
| 209 | |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 210 | def testInvalid(filename, id): |
| 211 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 212 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 213 | global log |
| 214 | |
| 215 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 216 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 217 | |
| 218 | ctxt = libxml2.createFileParserCtxt(filename) |
| 219 | if ctxt == None: |
| 220 | return -1 |
| 221 | ctxt.validate(1) |
Daniel Veillard | 8f597c3 | 2003-10-06 08:19:27 +0000 | [diff] [blame] | 222 | ret = ctxt.parseDocument() |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 223 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 224 | try: |
| 225 | doc = ctxt.doc() |
| 226 | except: |
| 227 | doc = None |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 228 | valid = ctxt.isValid() |
| 229 | if doc == None: |
| 230 | print "%s: error: wrongly failed to parse the document" % (id) |
| 231 | log.write("%s: error: wrongly failed to parse the document\n" % (id)) |
| 232 | return 0 |
| 233 | if valid == 1: |
| 234 | print "%s: error: Validity error not detected" % (id) |
| 235 | log.write("%s: error: Validity error not detected\n" % (id)) |
| 236 | doc.freeDoc() |
| 237 | return 0 |
| 238 | if error_nr == 0: |
| 239 | print "%s: warning: Validity error not reported" % (id) |
| 240 | log.write("%s: warning: Validity error not reported\n" % (id)) |
| 241 | doc.freeDoc() |
| 242 | return 2 |
| 243 | |
| 244 | doc.freeDoc() |
| 245 | return 1 |
| 246 | |
| 247 | def testValid(filename, id): |
| 248 | global error_nr |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 249 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 250 | |
| 251 | error_nr = 0 |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 252 | error_msg = '' |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 253 | |
| 254 | ctxt = libxml2.createFileParserCtxt(filename) |
| 255 | if ctxt == None: |
| 256 | return -1 |
| 257 | ctxt.validate(1) |
| 258 | ctxt.parseDocument() |
| 259 | |
Daniel Veillard | fa49d87 | 2002-03-09 10:20:00 +0000 | [diff] [blame] | 260 | try: |
| 261 | doc = ctxt.doc() |
| 262 | except: |
| 263 | doc = None |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 264 | valid = ctxt.isValid() |
| 265 | if doc == None: |
| 266 | print "%s: error: wrongly failed to parse the document" % (id) |
| 267 | log.write("%s: error: wrongly failed to parse the document\n" % (id)) |
| 268 | return 0 |
| 269 | if valid != 1: |
| 270 | print "%s: error: Validity check failed" % (id) |
| 271 | log.write("%s: error: Validity check failed\n" % (id)) |
| 272 | doc.freeDoc() |
| 273 | return 0 |
| 274 | if error_nr != 0 or valid != 1: |
| 275 | print "%s: warning: valid document reported an error" % (id) |
| 276 | log.write("%s: warning: valid document reported an error\n" % (id)) |
| 277 | doc.freeDoc() |
| 278 | return 2 |
| 279 | doc.freeDoc() |
| 280 | return 1 |
| 281 | |
| 282 | test_nr = 0 |
| 283 | test_succeed = 0 |
| 284 | test_failed = 0 |
| 285 | test_error = 0 |
| 286 | def runTest(test): |
| 287 | global test_nr |
| 288 | global test_failed |
| 289 | global test_error |
| 290 | global test_succeed |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 291 | global error_msg |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 292 | global log |
| 293 | |
| 294 | uri = test.prop('URI') |
| 295 | id = test.prop('ID') |
| 296 | if uri == None: |
| 297 | print "Test without ID:", uri |
| 298 | return -1 |
| 299 | if id == None: |
| 300 | print "Test without URI:", id |
| 301 | return -1 |
| 302 | base = test.getBase(None) |
| 303 | URI = libxml2.buildURI(uri, base) |
| 304 | if os.access(URI, os.R_OK) == 0: |
| 305 | print "Test %s missing: base %s uri %s" % (URI, base, uri) |
| 306 | return -1 |
| 307 | type = test.prop('TYPE') |
| 308 | if type == None: |
| 309 | print "Test %s missing TYPE" % (id) |
| 310 | return -1 |
| 311 | |
| 312 | extra = None |
| 313 | if type == "invalid": |
| 314 | res = testInvalid(URI, id) |
| 315 | elif type == "valid": |
| 316 | res = testValid(URI, id) |
| 317 | elif type == "not-wf": |
| 318 | extra = test.prop('ENTITIES') |
| 319 | # print URI |
| 320 | #if extra == None: |
| 321 | # res = testNotWfEntDtd(URI, id) |
| 322 | #elif extra == 'none': |
| 323 | # res = testNotWf(URI, id) |
| 324 | #elif extra == 'general': |
| 325 | # res = testNotWfEnt(URI, id) |
| 326 | #elif extra == 'both' or extra == 'parameter': |
| 327 | res = testNotWfEntDtd(URI, id) |
| 328 | #else: |
| 329 | # print "Unknow value %s for an ENTITIES test value" % (extra) |
| 330 | # return -1 |
| 331 | elif type == "error": |
Daniel Veillard | 55253e2 | 2002-02-18 14:32:39 +0000 | [diff] [blame] | 332 | res = testError(URI, id) |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 333 | else: |
| 334 | # TODO skipped for now |
| 335 | return -1 |
| 336 | |
| 337 | test_nr = test_nr + 1 |
| 338 | if res > 0: |
| 339 | test_succeed = test_succeed + 1 |
| 340 | elif res == 0: |
| 341 | test_failed = test_failed + 1 |
| 342 | elif res < 0: |
| 343 | test_error = test_error + 1 |
| 344 | |
| 345 | # Log the ontext |
| 346 | if res != 1: |
| 347 | log.write(" File: %s\n" % (URI)) |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 348 | content = string.strip(test.content) |
| 349 | while content[-1] == '\n': |
| 350 | content = content[0:-1] |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 351 | if extra != None: |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 352 | log.write(" %s:%s:%s\n" % (type, extra, content)) |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 353 | else: |
| 354 | log.write(" %s:%s\n\n" % (type, content)) |
Daniel Veillard | c761299 | 2002-02-17 22:47:37 +0000 | [diff] [blame] | 355 | if error_msg != '': |
| 356 | log.write(" ----\n%s ----\n" % (error_msg)) |
| 357 | error_msg = '' |
| 358 | log.write("\n") |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 359 | |
| 360 | return 0 |
| 361 | |
| 362 | |
| 363 | def runTestCases(case): |
| 364 | profile = case.prop('PROFILE') |
| 365 | if profile != None and \ |
| 366 | string.find(profile, "IBM XML Conformance Test Suite - Production") < 0: |
| 367 | print "=>", profile |
| 368 | test = case.children |
| 369 | while test != None: |
| 370 | if test.name == 'TEST': |
| 371 | runTest(test) |
| 372 | if test.name == 'TESTCASES': |
| 373 | runTestCases(test) |
| 374 | test = test.next |
| 375 | |
| 376 | conf = loadNoentDoc(CONF) |
| 377 | if conf == None: |
| 378 | print "Unable to load %s" % CONF |
| 379 | sys.exit(1) |
| 380 | |
| 381 | testsuite = conf.getRootElement() |
| 382 | if testsuite.name != 'TESTSUITE': |
| 383 | print "Expecting TESTSUITE root element: aborting" |
| 384 | sys.exit(1) |
| 385 | |
| 386 | profile = testsuite.prop('PROFILE') |
| 387 | if profile != None: |
| 388 | print profile |
| 389 | |
Daniel Veillard | 878eab0 | 2002-02-19 13:46:09 +0000 | [diff] [blame] | 390 | start = time.time() |
| 391 | |
Daniel Veillard | bb7ddb3 | 2002-02-17 21:26:33 +0000 | [diff] [blame] | 392 | case = testsuite.children |
| 393 | while case != None: |
| 394 | global test_nr |
| 395 | global test_succeed |
| 396 | global test_failed |
| 397 | global test_error |
| 398 | |
| 399 | if case.name == 'TESTCASES': |
| 400 | old_test_nr = test_nr |
| 401 | old_test_succeed = test_succeed |
| 402 | old_test_failed = test_failed |
| 403 | old_test_error = test_error |
| 404 | runTestCases(case) |
| 405 | print " Ran %d tests: %d suceeded, %d failed and %d generated an error" % ( |
| 406 | test_nr - old_test_nr, test_succeed - old_test_succeed, |
| 407 | test_failed - old_test_failed, test_error - old_test_error) |
| 408 | case = case.next |
| 409 | |
| 410 | conf.freeDoc() |
| 411 | log.close() |
| 412 | |
Daniel Veillard | 878eab0 | 2002-02-19 13:46:09 +0000 | [diff] [blame] | 413 | print "Ran %d tests: %d suceeded, %d failed and %d generated an error in %.2f s." % ( |
| 414 | test_nr, test_succeed, test_failed, test_error, time.time() - start) |