Show More
@@ -304,8 +304,14 b' def parsehghaveoutput(lines):' | |||
|
304 | 304 | |
|
305 | 305 | def showdiff(expected, output, ref, err): |
|
306 | 306 | |
|
307 | servefail = False | |
|
307 | 308 | for line in difflib.unified_diff(expected, output, ref, err): |
|
308 | 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 | 316 | verbose = False |
|
311 | 317 | def vlog(*msg): |
@@ -1028,17 +1034,21 b' def runone(options, test, count):' | |||
|
1028 | 1034 | elif ret == 'timeout': |
|
1029 | 1035 | result = fail("timed out", ret) |
|
1030 | 1036 | elif out != refout: |
|
1037 | info = {} | |
|
1031 | 1038 | if not options.nodiff: |
|
1032 | 1039 | iolock.acquire() |
|
1033 | 1040 | if options.view: |
|
1034 | 1041 | os.system("%s %s %s" % (options.view, ref, err)) |
|
1035 | 1042 | else: |
|
1036 | showdiff(refout, out, ref, err) | |
|
1043 | info = showdiff(refout, out, ref, err) | |
|
1037 | 1044 | iolock.release() |
|
1045 | msg = "" | |
|
1046 | if info.get('servefail'): msg += "serve failed and " | |
|
1038 | 1047 | if ret: |
|
1039 |
|
|
|
1048 | msg += "output changed and " + describe(ret) | |
|
1040 | 1049 | else: |
|
1041 |
|
|
|
1050 | msg += "output changed" | |
|
1051 | result = fail(msg, ret) | |
|
1042 | 1052 | elif ret: |
|
1043 | 1053 | result = fail(describe(ret), ret) |
|
1044 | 1054 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now