Changeset: 2ab20eee61da for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ab20eee61da
Modified Files:
        testing/Mtest.py.in
        testing/sqllogictest.py
Branch: Oct2020
Log Message:

Don't ignore interrupt.


diffs (150 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1308,6 +1308,8 @@ def PerformDir(env, testdir, testlist, B
             if not env.get('NOCLEAN') and LogDBdir and 
os.path.exists(LogDBdir):
                 try:
                     shutil.rmtree(LogDBdir)
+                except KeyboardInterrupt:
+                    raise
                 except:
                     Warn("database '%s` exists, but destroying it failed; 
skipping tests in '%s`!" % (TSTDB, TSTSRCDIR))
                     #TODO:
@@ -1332,6 +1334,8 @@ def PerformDir(env, testdir, testlist, B
                     return td, elem, max(FdOut, FdErr), interrupted
                 try:
                     z.extractall(LogDBdir)
+                except KeyboardInterrupt:
+                    raise
                 except:
                     Warn("initial database '%s` cannot be extracted; skipping 
tests in '%s`!" % (initdb, TSTSRCDIR))
                     #TODO:
@@ -1468,6 +1472,8 @@ def PerformDir(env, testdir, testlist, B
         if testweb:
             try:
                 os.removedirs(TSTTRGDIR)
+            except KeyboardInterrupt:
+                raise
             except:
                 pass
 
@@ -2886,6 +2892,8 @@ def killProc(proc, outfile = None, cmd =
             out, err = p.communicate()
             if t is not None:
                 t.cancel()
+        except KeyboardInterrupt:
+            raise
         except:
             out = ''
     if outfile is not None and out:
@@ -3238,6 +3246,8 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                     sql.connect(hostname='localhost',
                                 port=int(env['MAPIPORT']),
                                 database=TSTDB)
+                except KeyboardInterrupt:
+                    raise
                 except:
                     returncode = 'error'
                 else:
@@ -4105,6 +4115,8 @@ def main(argv) :
         if proc.returncode == 0:
             CONDITIONALS['MERCURIAL'] = '#' # True
         proc = None
+    except KeyboardInterrupt:
+        raise
     except:
         pass
     os.chdir(BACK)
@@ -4115,6 +4127,8 @@ def main(argv) :
     else:
         try:
             socket.getaddrinfo(socket.gethostname(), None)
+        except KeyboardInterrupt:
+            raise
         except:
             CONDITIONALS['BAD_HOSTNAME'] = '#' # True
 
@@ -4246,6 +4260,8 @@ def main(argv) :
             if proc.returncode == 0:
                 REV = out.strip()
             proc = None
+        except KeyboardInterrupt:
+            raise
         except:
             pass
     # fix up URLPREFIX
@@ -4271,6 +4287,8 @@ def main(argv) :
                             (sockdir, env['MAPIPORT'])
                     HOST = sockdir
                     os.environ['MAPIHOST'] = HOST
+                except KeyboardInterrupt:
+                    raise
                 except:
                     SOCK = ""
             else:
@@ -4427,6 +4445,8 @@ def main(argv) :
             if not env.get('NOCLEAN') and 
os.path.exists(os.path.join(TSTTRGBASE, TSTPREF)):
                 try:
                     shutil.rmtree(os.path.join(TSTTRGBASE, TSTPREF))
+                except KeyboardInterrupt:
+                    raise
                 except:
                     ErrXit("Failed to remove %s" % os.path.join(TSTTRGBASE, 
TSTPREF))
             if not os.path.exists(env['GDK_DBFARM']):
@@ -4436,6 +4456,8 @@ def main(argv) :
             if not env.get('NOCLEAN') and 
os.path.exists(os.path.join(env['GDK_DBFARM'], TSTPREF)):
                 try:
                     shutil.rmtree(os.path.join(env['GDK_DBFARM'], TSTPREF))
+                except KeyboardInterrupt:
+                    raise
                 except:
                     ErrXit("Failed to remove %s" % 
os.path.join(env['GDK_DBFARM'], TSTPREF))
             try:
@@ -4738,6 +4760,8 @@ VALUES (%s, '%s', '%s', '%s',
         if THISFILE == "Mtest.py" and SOCK:
             try:
                 shutil.rmtree(sockdir);
+            except KeyboardInterrupt:
+                raise
             except:
                 pass
 
diff --git a/testing/sqllogictest.py b/testing/sqllogictest.py
--- a/testing/sqllogictest.py
+++ b/testing/sqllogictest.py
@@ -59,6 +59,8 @@ class SQLLogic:
         for row in self.crs.fetchall():
             try:
                 self.crs.execute('drop table "%s" cascade' % 
row[0].replace('"', '""'))
+            except KeyboardInterrupt:
+                raise
             except:
                 pass
 
@@ -71,6 +73,8 @@ class SQLLogic:
         except pymonetdb.DatabaseError:
             if not expectok:
                 return
+        except KeyboardInterrupt:
+            raise
         except:
             type, value, traceback = sys.exc_info()
             self.query_error(statement, 'unexpected error from pymonetdb', 
str(value))
@@ -134,6 +138,8 @@ class SQLLogic:
         except pymonetdb.DatabaseError as e:
             self.query_error(query, 'query failed', e.args[0])
             return
+        except KeyboardInterrupt:
+            raise
         except:
             type, value, traceback = sys.exc_info()
             self.query_error(query, 'unexpected error from pymonetdb', 
str(value))
@@ -146,6 +152,8 @@ class SQLLogic:
             return
         try:
             data = self.crs.fetchall()
+        except KeyboardInterrupt:
+            raise
         except:
             type, value, traceback = sys.exc_info()
             self.query_error(query, 'unexpected error from pymonetdb', 
str(value))
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to