Changeset: 62ed2306a17e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/62ed2306a17e
Modified Files:
        testing/Mtest.py.in
Branch: default
Log Message:

clean up between python tests as well


diffs (34 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2805,6 +2805,30 @@ def DoIt(env, SERVER, CALL, TST, EXT, Te
                 cmd = [os.path.join(".", TST + EXT), TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL == "python":
+                # do clean up between tests if no dependent tests
+                # borrow clean up function from sqllogictest
+                if not os.path.exists(TST+'.reqtests'):
+                    import MonetDBtesting.sqllogictest as sqllogictest
+                    with sqllogictest.SQLLogic(out=ClntErr) as sql:
+                        try:
+                            sql.connect(username=user or 'monetdb',
+                                        password=passwd or 'monetdb',
+                                        hostname=HOST,
+                                        port=int(pSrvr.port),
+                                        database=TSTDB,
+                                        language='sql',
+                                        timeout=TIMEOUT)
+                        except KeyboardInterrupt:
+                            raise
+                        except:
+                            returncode = 'error'
+                        else:
+                            try:
+                                sql.drop()
+                            except KeyboardInterrupt:
+                                raise
+                            except:
+                                pass
                 cmd = [sys.executable, TST + EXT, TST]
                 returncode = RunIt(cmd, False, "", ClntOut, ClntErr, TIMEOUT)
             elif CALL in ["mal", "malXs"]:
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to