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

subprocess.Popen with cwd and relative path on Windows is an issue.
The command is not searched in the cwd directory, so we need to join
paths.


diffs (19 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2751,9 +2751,15 @@ def RunIt(cmd, onechild, TestIn, TestOut
         print('RunIt: starting process "%s"\n' % '" "'.join(cmd))
     if TimeOut:
         environ['TIMEOUT'] = str(TimeOut)
+    executable = None
+    if os.name == 'nt' and isinstance(cmd, list):
+        executable = os.path.join(TSTTRGDIR, cmd[0])
+        if not os.path.exists(executable):
+            executable = None
     with process.Popen(cmd, stdin=TestIn, stdout=TestOut,
                        stderr=TestErr, text=True,
                        cwd=TSTTRGDIR, env=environ,
+                       executable=executable,
                        process_group=0) as proc:
         proc.killed = False
         proc.onechild = onechild
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to