Changeset: cae34ce92753 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cae34ce92753
Modified Files:
        testing/Mtest.py.in
Branch: Jul2015
Log Message:

Some improvements in handling timeouts and early errors during testing.


diffs (51 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2572,7 +2572,7 @@ def killProc(proc, outfile = None, cmd =
             cmd = ' '.join(cmd)
         try:
             outfile.write('\n!Mtimeout: Timeout: %s\n' % cmd)
-        except ValueError:
+        except (ValueError, IOError):
             print 'cannot write timeout message',cmd
     if os.name == "nt":
         sym = ''
@@ -2602,8 +2602,9 @@ def killProc(proc, outfile = None, cmd =
     if outfile is not None and out:
         try:
             outfile.write('\n%s\n' % out)
-        except ValueError:
+        except (ValueError, IOError):
             print 'cannot write stack trace'
+            print out
     proc.killed = True
     try:
         os.kill(-proc.pid, signal.SIGKILL)
@@ -3096,8 +3097,10 @@ def Check(command, input) :
         raise
     qOut = qOut.split('\n')
     qErr = qErr.split('\n')
+    failed = False
     if proc.returncode:
         qOut.append('! Exit 1')
+        failed = True
     test = re.compile( r"^!WARNING: BATpropcheck: "                            
              "|"
                        r"^!WARNING: monet_checkbat: "                          
              "|"
                        r"^!WARNING: GDKlockHome: ignoring empty or invalid 
.gdk_lock."       "|"
@@ -3111,6 +3114,7 @@ def Check(command, input) :
                     noErr.append(l+"\n")
             else:
                 ErrMsg('"%s" failed:' % '" "'.join(command))
+                failed = True
                 if qOut and qOut[-1].startswith("! Exit 1"):
                     qErr.append(qOut.pop())
                 for l in qOut+qErr:
@@ -3131,7 +3135,7 @@ def Check(command, input) :
         STDOUT.flush()
         STDERR.writelines(noErr)
         STDERR.flush()
-    return 0
+    return failed
 ### Check(command, input) #
 
 def CheckClassPath() :
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to