Changeset: 43cf1ecd90d5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/43cf1ecd90d5
Modified Files:
        testing/Mtest.py.in
Branch: Dec2025
Log Message:

Make debugging easier: print command, directory, environment in server output 
file.
I.e. usually SingleServer.out.


diffs (30 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2817,12 +2817,10 @@ class ServerClass:
                 self.lock.release()
 
     def LaunchIt(self, cwd=None, env=os.environ):
-        self.outfile.flush()
-        self.errfile.flush()
-
         cmd = self.cmd
         if procdebug:
             print('LaunchIt: starting process "%s" (inpipe)\n' % '" 
"'.join(cmd))
+
         stdin = process.DEVNULL
         stdout = self.outfile
         stderr = self.errfile
@@ -2843,6 +2841,12 @@ class ServerClass:
 
         else:
             stdout = process.PIPE
+        print(f'# Launching {cmd}', file=self.outfile)
+        if cwd is not None:
+            print(f'# in directory {cwd}', file=self.outfile)
+        print(f'# Environment: {env}', file=self.outfile)
+        self.outfile.flush()
+        self.errfile.flush()
         if os.name == 'nt':
             proc = process.Popen(cmd, stdin=stdin, stdout=stdout,
                                  stderr=stderr, text=True, cwd=cwd, env=env,
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to