Changeset: f758b31f4033 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f758b31f4033
Modified Files:
        testing/Mtest.py.in
        testing/process.py
Branch: Mar2025
Log Message:

New Mtest option --use-tcp to use TCP/IP even when UNIX domain sockets are 
available.


diffs (58 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -43,6 +43,7 @@ restart = False
 produce_html = True
 ignore_conditions = False
 skip_timeout = False
+usetcp = False                  # use UNIX domain socket if available
 
 # extra mserver5 options
 mserver5_opts = []
@@ -2920,7 +2921,7 @@ class ServerClass:
                 res = mapiportre.search(connurl)
                 if res is not None:
                     port = res.group('port')
-                elif 'monetdb:///' in connurl:
+                elif 'monetdb:///' in connurl and not usetcp:
                     self.usock = connurl
         else:
             loadedseen = False
@@ -3754,6 +3755,7 @@ def main(argv):
     parser.add_argument('--ci', action='store_true', dest='ci', help='special 
handling for continuous integration (no error return unless serious problem)')
     parser.add_argument('--parallel', action='store', type=int, default=1, 
metavar='<directories>', help='run multiple directories in parallel')
     parser.add_argument('--checkkeys', action='store_true', help='at end of 
directory check all system keys')
+    parser.add_argument('--use-tcp', action='store_true', help='do not use 
UNIX domain sockets')
     global produce_html
     if produce_html:
         parser.add_argument('--no-html', action='store_false', 
dest='produce_html', help='do not produce HTML files')
@@ -3809,6 +3811,9 @@ def main(argv):
         CONDITIONALS['KNOWNFAIL'] = True
     global checkkeys
     checkkeys = opts.checkkeys
+    global usetcp
+    usetcp = opts.use_tcp
+    process.no_unix_sockets = opts.use_tcp
     par['TIMEOUT'] = opts.timeout
     env['GDK_DEBUG'] = str(opts.debug)
     env['GDK_NR_THREADS'] = str(opts.nr_threads)
diff --git a/testing/process.py b/testing/process.py
--- a/testing/process.py
+++ b/testing/process.py
@@ -36,6 +36,7 @@ else:
 
 verbose = False
 
+no_unix_sockets = False
 
 _mal_client = shlex.split(os.getenv('MAL_CLIENT', 'mclient -lmal'))
 _sql_client = shlex.split(os.getenv('SQL_CLIENT', 'mclient -lsql'))
@@ -600,6 +601,8 @@ class server(Popen):
                     # retrieve mapi port if available
                     for c in conn.splitlines():
                         if 'monetdb:///' in c:
+                            if no_unix_sockets:
+                                continue
                             self.usock = c.strip()
                             if verbose:
                                 print(f'usock: {self.usock}')
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to