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

Mapprove.py: prevent approval of crashes (segfault, assertion, timeout, etc.)


diffs (24 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1230,6 +1230,8 @@ def ApproveOutput (env, TST) :
 #       filter = re.compile( "^!WARNING: TCPlisten\([0-9]*\): stopped.$"       
 "|"
 #                            "^!WARNING: TCPepilogue: terminate [01] 
listeners$", re.MULTILINE)
 
+    TO = re.compile("(^\+(|[^#]*[\t ])((Memory|Segmentation) [Ff]ault|Bus 
[Ee]rror|Abort(|ed)|Assertion (|.* )failed[:\.]|!FATAL: BATSIGabort:|ERROR = 
!Connection terminated|!Mtimeout: Timeout:)([ \t]|$)|aborted too deep 
recursion)", re.MULTILINE)
+
     for WHAT in EXTENSIONS:
         testOUTPUT = os.path.join(TSTTRGDIR, "%s.test.%s" % (TST, WHAT))
         TSTSRCDIRTST = os.path.join(TSTSRCDIR, TST)
@@ -1274,7 +1276,10 @@ def ApproveOutput (env, TST) :
 
                 f = open(patch + ".1", "w")
                 for l in open(patch + ".0"):
-                    if len(l) < 2  or  \
+                    if TO.search(l):
+                        f.write(l[:1] + '\n')
+                        Warn('Rejecting (error) message: "%s"' % 
l[1:].replace(os.linesep, ''))
+                    elif len(l) < 2  or  \
                        ( l[:2] not in ['+!','+=']  and  l[:10] != '+ERROR = !' 
 and  \
                          l[:8] != '+ERROR: '  and  l[:10] != '+WARNING: ' ) :  
      # or  filter.match(ln):
                         f.write(l)
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to