##// END OF EJS Templates
run-tests: test result shows when a failed test could not start a server...
Simon Heimberg -
r21022:52e9e63f default
parent child Browse files
Show More
@@ -304,8 +304,14 b' def parsehghaveoutput(lines):'
304
304
305 def showdiff(expected, output, ref, err):
305 def showdiff(expected, output, ref, err):
306 print
306 print
307 servefail = False
307 for line in difflib.unified_diff(expected, output, ref, err):
308 for line in difflib.unified_diff(expected, output, ref, err):
308 sys.stdout.write(line)
309 sys.stdout.write(line)
310 if not servefail and line.startswith(
311 '+ abort: child process failed to start'):
312 servefail = True
313 return {'servefail': servefail}
314
309
315
310 verbose = False
316 verbose = False
311 def vlog(*msg):
317 def vlog(*msg):
@@ -1028,17 +1034,21 b' def runone(options, test, count):'
1028 elif ret == 'timeout':
1034 elif ret == 'timeout':
1029 result = fail("timed out", ret)
1035 result = fail("timed out", ret)
1030 elif out != refout:
1036 elif out != refout:
1037 info = {}
1031 if not options.nodiff:
1038 if not options.nodiff:
1032 iolock.acquire()
1039 iolock.acquire()
1033 if options.view:
1040 if options.view:
1034 os.system("%s %s %s" % (options.view, ref, err))
1041 os.system("%s %s %s" % (options.view, ref, err))
1035 else:
1042 else:
1036 showdiff(refout, out, ref, err)
1043 info = showdiff(refout, out, ref, err)
1037 iolock.release()
1044 iolock.release()
1045 msg = ""
1046 if info.get('servefail'): msg += "serve failed and "
1038 if ret:
1047 if ret:
1039 result = fail("output changed and " + describe(ret), ret)
1048 msg += "output changed and " + describe(ret)
1040 else:
1049 else:
1041 result = fail("output changed", ret)
1050 msg += "output changed"
1051 result = fail(msg, ret)
1042 elif ret:
1052 elif ret:
1043 result = fail(describe(ret), ret)
1053 result = fail(describe(ret), ret)
1044 else:
1054 else:
General Comments 0
You need to be logged in to leave comments. Login now