Changeset: f88cc52c1c76 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f88cc52c1c76 Modified Files: testing/Mtest.py.in Branch: Oct2020 Log Message:
Implemented option --single-in-memory to test --in-memory. This uses --in-memory for "SingleServer" directories that do not need embedded R/C/Python. diffs (53 lines): diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in --- a/testing/Mtest.py.in +++ b/testing/Mtest.py.in @@ -44,6 +44,7 @@ verbose = False quiet = False initdb = None +single_in_memory = False global_timeout = 0 start_time = time.time() @@ -1351,11 +1352,22 @@ def PerformDir(env, testdir, testlist, B for TST,COND in testlist: if oneserver and (pSrvr is None or pSrvr.poll() is not None): # restart server - pSrvr = ServerClass(splitcommand(env['exe']['mserver5'][1]) + ['--dbpath=%s' % LogDBdir] + options, + inmem = single_in_memory + for o in options: + if o.startswith('embedded'): + inmem = False + break + if inmem: + cmd = splitcommand(env['exe']['mserver5'][1]) + ['--set', 'gdk_dbname=%s' % TSTDB, '--in-memory'] + options + pollfile = None + else: + cmd = splitcommand(env['exe']['mserver5'][1]) + ['--dbpath=%s' % LogDBdir] + options + pollfile = os.path.join(LogDBdir, '.started') + pSrvr = ServerClass(cmd, open(os.path.join(TSTTRGDIR, 'SingleServer.out'), 'a'), open(os.path.join(TSTTRGDIR, 'SingleServer.err'), 'a'), 0, - os.path.join(LogDBdir, '.started'), + pollfile, int(env['MAPIPORT'])) os.chdir(TSTTRGDIR) pSrvr.LaunchIt() @@ -3769,6 +3781,7 @@ def main(argv) : parser.add_argument('--data_path', '-D', action='store', dest='data_path', metavar='<path>', help='Path to the root directory of the data files needed for testing') parser.add_argument('--alltests', action='store_true', dest='alltests', help='also run tests that are known to fail') parser.add_argument('--initdb', action='store', dest='initdb', metavar='<zipfile>', help='zip file with contents for initial database') + parser.add_argument('--single-in-memory', action='store_true', dest='single_in_memory', help='use --in-memory for SingleServer directories') elif THISFILE == 'Mapprove.py': f = _configure(os.path.join('@QXprefix@',dftTSTPREF,'.Mapprove.rc')) v = ReadMapproveRc(f) @@ -3850,6 +3863,8 @@ def main(argv) : env['TSTDATAPATH'] = a global initdb initdb = opts.initdb + global single_in_memory + single_in_memory = opts.single_in_memory if THISFILE == 'Mapprove.py': a = opts.ext if a is None: _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list