Changeset: 496ec523f369 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/496ec523f369
Modified Files:
testing/Mtest.py.in
Branch: Dec2025
Log Message:
Delay starting processes until after argument handling.
We want --help and --version to be fast...
diffs (75 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3657,35 +3657,6 @@ def main(argv):
dft['SQLCLIENT'] = "'mclient -lsql -ftest -tnone -Eutf-8'"
dft['SQLDUMP'] = "'msqldump -q'"
- r_noecho = '--no-echo'
- if CheckExec('R'):
- with process.Popen(['R', '--version'],
- stdout=process.PIPE, stderr=process.PIPE,
- text=True) as proc:
- r_out, r_err = proc.communicate()
- res = re.search(r'R version (?P<major>\d+)\.', r_out)
- if res is not None and int(res.group('major')) < 4:
- r_noecho = '--slave'
- if CONDITIONALS['HAVE_LIBR']:
- with process.Popen(['R', r_noecho, '--no-save', '--no-restore',
- '-e', 'print(Sys.getenv("R_LIBS_USER"))'],
- stdout=process.PIPE, stderr=process.PIPE,
- text=True) as proc:
- r_out, r_err = proc.communicate()
- res = re.search(r'\[\d+\] "(?P<dir>.*)"', r_out)
- if res is not None:
- rdir = os.path.expanduser(res.group('dir'))
- os.makedirs(rdir, exist_ok=True)
-
- CONDITIONALS['HAVE_SQLITE3ODBC'] =
os.path.exists('/usr/lib64/libsqlite3odbc.so')
-
- #par = {}
- # get current environment
- env['HOST'] = os.environ['HOST']
- for v in VARS:
- if v in os.environ:
- env[v] = os.environ[v]
-
# commandline options overrule environment
parser = argparse.ArgumentParser(usage='%(prog)s [options] ( [<dir>]
[<tests>] | [<dirs>] )', epilog='See %s for details about %s.' %
(os.path.join('@QXSOURCE@','testing','README'), THISFILE))
parser.add_argument('--version', action='version', version='@VERSION@')
@@ -3741,6 +3712,35 @@ def main(argv):
opts = parser.parse_args()
args = opts.tests
+ r_noecho = '--no-echo'
+ if CheckExec('R'):
+ with process.Popen(['R', '--version'],
+ stdout=process.PIPE, stderr=process.PIPE,
+ text=True) as proc:
+ r_out, r_err = proc.communicate()
+ res = re.search(r'R version (?P<major>\d+)\.', r_out)
+ if res is not None and int(res.group('major')) < 4:
+ r_noecho = '--slave'
+ if CONDITIONALS['HAVE_LIBR']:
+ with process.Popen(['R', r_noecho, '--no-save', '--no-restore',
+ '-e', 'print(Sys.getenv("R_LIBS_USER"))'],
+ stdout=process.PIPE, stderr=process.PIPE,
+ text=True) as proc:
+ r_out, r_err = proc.communicate()
+ res = re.search(r'\[\d+\] "(?P<dir>.*)"', r_out)
+ if res is not None:
+ rdir = os.path.expanduser(res.group('dir'))
+ os.makedirs(rdir, exist_ok=True)
+
+ CONDITIONALS['HAVE_SQLITE3ODBC'] =
os.path.exists('/usr/lib64/libsqlite3odbc.so')
+
+ #par = {}
+ # get current environment
+ env['HOST'] = os.environ['HOST']
+ for v in VARS:
+ if v in os.environ:
+ env[v] = os.environ[v]
+
if opts.loglevel:
import logging
try:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]