tests/run-tests.py
branchstable
changeset 1370 d6cab997a43e
parent 1369 1161be3ff133
--- a/tests/run-tests.py	Sun Apr 13 19:01:00 2014 +0200
+++ b/tests/run-tests.py	Mon Nov 25 22:00:46 2013 +0100
@@ -304,8 +304,14 @@
 
 def showdiff(expected, output, ref, err):
     print
+    servefail = False
     for line in difflib.unified_diff(expected, output, ref, err):
         sys.stdout.write(line)
+        if not servefail and line.startswith(
+                             '+  abort: child process failed to start'):
+            servefail = True
+    return {'servefail': servefail}
+
 
 verbose = False
 def vlog(*msg):
@@ -1031,17 +1037,21 @@
     elif ret == 'timeout':
         result = fail("timed out", ret)
     elif out != refout:
+        info = {}
         if not options.nodiff:
             iolock.acquire()
             if options.view:
                 os.system("%s %s %s" % (options.view, ref, err))
             else:
-                showdiff(refout, out, ref, err)
+                info = showdiff(refout, out, ref, err)
             iolock.release()
+        msg = ""
+        if info.get('servefail'): msg += "serve failed and "
         if ret:
-            result = fail("output changed and " + describe(ret), ret)
+            msg += "output changed and " + describe(ret)
         else:
-            result = fail("output changed", ret)
+            msg += "output changed"
+        result = fail(msg, ret)
     elif ret:
         result = fail(describe(ret), ret)
     else: