Commit 8b7967c3 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

when output and expected do not match exactly run diff to put the

* check-xinclude-test-suite.py: when output and expected do not match
  exactly run diff to put the differences in the log c.f. #148691
Daniel
parent 9d267496
Mon Sep 6 11:52:50 CEST 2004 Daniel Veillard <daniel@veillard.com>
* check-xinclude-test-suite.py: when output and expected do not match
exactly run diff to put the differences in the log c.f. #148691
Mon Sep 6 11:17:35 CEST 2004 Kasimier Buchcik <libxml2-cvs@cazic.net>
 
* xstc/xstc-to-python.xslt xstc/ms-test-def.xml xstc/nist-test-def.xml
......
......@@ -82,6 +82,8 @@ def runTest(test, basedir):
return -1
expected = None
outputfile = None
diff = None
if type != 'error':
output = test.xpathEval('string(output)')
if output == 'No output file.':
......@@ -98,6 +100,7 @@ def runTest(test, basedir):
try:
f = open(output)
expected = f.read()
outputfile = output
except:
print "Result for %s unreadable: %s" % (id, output)
......@@ -112,6 +115,8 @@ def runTest(test, basedir):
result = doc.serialize()
if result != expected:
print "Result for %s differs" % (id)
open("xinclude.res", "w").write(result)
diff = os.popen("diff %s xinclude.res" % outputfile).read()
doc.freeDoc()
else:
......@@ -157,6 +162,9 @@ def runTest(test, basedir):
log.write(" ----\n%s ----\n" % (error_msg))
error_msg = ''
log.write("\n")
if diff != None:
log.write("diff from test %s:\n" %(id))
log.write(" -----------\n%s\n -----------\n" % (diff));
return 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment