Changeset: 5ce40dc4e0b6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5ce40dc4e0b6
Modified Files:
        MonetDB.spec
        clients/Tests/mclient-uri.SQL.sh
        debian/monetdb-testing-python.install
        testing/CMakeLists.txt
        testing/Mtest.py.in
Branch: mtest
Log Message:

Remove Mapprove.py.


diffs (truncated from 1571 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -712,7 +712,6 @@ developer, but if you do want to test, t
 
 %files testing-python
 %defattr(-,root,root)
-%{_bindir}/Mapprove.py
 %{_bindir}/Mtest.py
 %dir %{python3_sitelib}/MonetDBtesting
 %{python3_sitelib}/MonetDBtesting/*
diff --git a/clients/Tests/mclient-uri.SQL.sh b/clients/Tests/mclient-uri.SQL.sh
--- a/clients/Tests/mclient-uri.SQL.sh
+++ b/clients/Tests/mclient-uri.SQL.sh
@@ -3,7 +3,7 @@
 # test the URI parsing capabilities of the MAPI library
 
 Mlog "mclient -d 
mapi:monetdb://$HOST:$MAPIPORT/$TSTDB?language=sql&user=monetdb -f test -t none 
-E utf-8 -s select 1"
-mclient -d "mapi:monetdb://$HOST:$MAPIPORT/$TSTDB?language=sql&user=monetdb" 
-f test -t none -E utf-8 -s 'select 1'
+mclient -d "mapi:monetdb://$HOST:$MAPIPORT/$TSTDB?language=sql&user=monetdb" 
-f csv -t none -E utf-8 -s 'select 1' | grep -v '^1$'
 
 Mlog "mclient -d 
mapi:monetdb://$MAPIHOST/.s.monetdb.$MAPIPORT?database=$TSTDB&language=sql&user=monetdb
 -f test -t none -E utf-8 -s select 1"
-mclient -d 
"mapi:monetdb://$MAPIHOST/.s.monetdb.$MAPIPORT?database=$TSTDB&language=sql&user=monetdb"
 -f test -t none -E utf-8 -s 'select 1'
+mclient -d 
"mapi:monetdb://$MAPIHOST/.s.monetdb.$MAPIPORT?database=$TSTDB&language=sql&user=monetdb"
 -f csv -t none -E utf-8 -s 'select 1' | grep -v '^1$'
diff --git a/debian/monetdb-testing-python.install 
b/debian/monetdb-testing-python.install
--- a/debian/monetdb-testing-python.install
+++ b/debian/monetdb-testing-python.install
@@ -1,3 +1,2 @@
-debian/tmp/usr/bin/Mapprove.py usr/bin
 debian/tmp/usr/bin/Mtest.py usr/bin
 debian/tmp/usr/lib/python3*/*-packages/MonetDBtesting/*
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -171,12 +171,6 @@ if(WIN32)
     DESTINATION ${CMAKE_INSTALL_BINDIR})
 
   install(FILES
-    Mtest.py.bat
-    DESTINATION
-    ${CMAKE_INSTALL_BINDIR}
-    RENAME Mapprove.py.bat)
-
-  install(FILES
     ${CMAKE_CURRENT_BINARY_DIR}/monetdb_mtest.bat
     PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
     DESTINATION ${CMAKE_INSTALL_BINDIR})
@@ -201,12 +195,6 @@ else()
     DESTINATION ${CMAKE_INSTALL_BINDIR}
     COMPONENT pytesting)
 
-  install(FILES
-    ${CMAKE_CURRENT_BINARY_DIR}/Mtest.py
-    PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
-    DESTINATION ${CMAKE_INSTALL_BINDIR}
-    RENAME Mapprove.py
-    COMPONENT pytesting)
 endif()
 
 configure_file(mktest.py
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -1218,10 +1218,7 @@ def PerformDir(env, testdir, testlist, B
     TSTSRCDIR = os.path.normpath(os.path.join(testdir, TSTSUFF))
     TSTTRGDIR = os.path.normpath(os.path.join(TSTTRGBASE, TSTPREF, TSTDIR))
 
-    if THISFILE == "Mtest.py":
-        TSTDB = TSTPREF + "_" + TSTDIR.replace(os.sep, '_')
-    else: # THISFILE == "Mapprove.py"
-        TSTDB = ""
+    TSTDB = TSTPREF + "_" + TSTDIR.replace(os.sep, '_')
 
     try:
         sys.path.insert(0, TSTSRCDIR)
@@ -1304,332 +1301,186 @@ def PerformDir(env, testdir, testlist, B
         #       print(v+" = "+str(env[v]))
         #STDOUT.flush()
 
-        if THISFILE == "Mtest.py":
-            if 'GDK_DBFARM' in env:
-                LogDBdir = os.path.join(env['GDK_DBFARM'],TSTDB)
-                if not env.get('NOCLEAN') and LogDBdir and 
os.path.exists(LogDBdir):
-                    try:
-                        shutil.rmtree(LogDBdir)
-                    except:
-                        Warn("database '%s` exists, but destroying it failed; 
skipping tests in '%s`!" % (TSTDB, TSTSRCDIR))
-                        #TODO:
-                        # add "something" to HTML output
-                        return td, elem, max(FdOut, FdErr), interrupted
-                if os.path.isabs(LogDBdir) and not os.path.exists(LogDBdir):
-                    try:
-                        os.makedirs(LogDBdir)
-                    except:
-                        Warn("creating database '%s` failed; skipping tests in 
'%s`!" % (TSTDB, TSTSRCDIR))
-                        #TODO:
-                        # add "something" to HTML output
-                        return td, elem, max(FdOut, FdErr), interrupted
-                if initdb:
-                    import zipfile
-                    try:
-                        z = zipfile.ZipFile(initdb)
-                    except IOError:
-                        Warn("initial database '%s` cannot be opened; skipping 
tests in '%s`!" % (initdb, TSTSRCDIR))
-                        #TODO:
-                        # add "something" to HTML output
-                        return td, elem, max(FdOut, FdErr), interrupted
-                    try:
-                        z.extractall(LogDBdir)
-                    except:
-                        Warn("initial database '%s` cannot be extracted; 
skipping tests in '%s`!" % (initdb, TSTSRCDIR))
-                        #TODO:
-                        # add "something" to HTML output
-                        return td, elem, max(FdOut, FdErr), interrupted
-                    z.close()
-                    if not oneserver:
-                        pSrvr = 
ServerClass(splitcommand(env['exe']['mserver5'][1]) + ['--dbpath=%s' % 
LogDBdir], open(os.devnull, 'w'), open(os.devnull, 'w'), par['TIMEOUT'], 
os.path.join(LogDBdir, '.started'), int(env['MAPIPORT']))
-                        pSrvr.LaunchIt()
-                        pSrvr.terminate()
-            if not os.path.exists(TSTTRGDIR):
-                #TODO: set mode to umask
-                os.makedirs(TSTTRGDIR)
-
-            body_good = []
-            body_bad = []
-            oktests = []
-            if not verbose and not quiet:
-                print('\nRunning in %s' % TSTDIR)
-            alllinks = []
-            pSrvr = None
+        if 'GDK_DBFARM' in env:
+            LogDBdir = os.path.join(env['GDK_DBFARM'],TSTDB)
+            if not env.get('NOCLEAN') and LogDBdir and 
os.path.exists(LogDBdir):
+                try:
+                    shutil.rmtree(LogDBdir)
+                except:
+                    Warn("database '%s` exists, but destroying it failed; 
skipping tests in '%s`!" % (TSTDB, TSTSRCDIR))
+                    #TODO:
+                    # add "something" to HTML output
+                    return td, elem, max(FdOut, FdErr), interrupted
+            if os.path.isabs(LogDBdir) and not os.path.exists(LogDBdir):
+                try:
+                    os.makedirs(LogDBdir)
+                except:
+                    Warn("creating database '%s` failed; skipping tests in 
'%s`!" % (TSTDB, TSTSRCDIR))
+                    #TODO:
+                    # add "something" to HTML output
+                    return td, elem, max(FdOut, FdErr), interrupted
+            if initdb:
+                import zipfile
+                try:
+                    z = zipfile.ZipFile(initdb)
+                except IOError:
+                    Warn("initial database '%s` cannot be opened; skipping 
tests in '%s`!" % (initdb, TSTSRCDIR))
+                    #TODO:
+                    # add "something" to HTML output
+                    return td, elem, max(FdOut, FdErr), interrupted
+                try:
+                    z.extractall(LogDBdir)
+                except:
+                    Warn("initial database '%s` cannot be extracted; skipping 
tests in '%s`!" % (initdb, TSTSRCDIR))
+                    #TODO:
+                    # add "something" to HTML output
+                    return td, elem, max(FdOut, FdErr), interrupted
+                z.close()
+                if not oneserver:
+                    pSrvr = 
ServerClass(splitcommand(env['exe']['mserver5'][1]) + ['--dbpath=%s' % 
LogDBdir], open(os.devnull, 'w'), open(os.devnull, 'w'), par['TIMEOUT'], 
os.path.join(LogDBdir, '.started'), int(env['MAPIPORT']))
+                    pSrvr.LaunchIt()
+                    pSrvr.terminate()
+        if not os.path.exists(TSTTRGDIR):
+            #TODO: set mode to umask
+            os.makedirs(TSTTRGDIR)
+
+        body_good = []
+        body_bad = []
+        oktests = []
+        if not verbose and not quiet:
+            print('\nRunning in %s' % TSTDIR)
+        alllinks = []
+        pSrvr = None
+        try:
             try:
-                try:
-                    for TST,COND in testlist:
-                        if oneserver and (pSrvr is None or pSrvr.poll() is not 
None):
-                            # restart server
-                            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')
-                            if env.get('MULTIFARM'):
-                                cmd.append('--dbextra=%s' % 
os.path.join(env['GDK_DBFARM'], TSTPREF + '_transient'))
-                                shutil.rmtree(os.path.join(env['GDK_DBFARM'], 
TSTPREF + '_transient'),
-                                              ignore_errors = True)
-                                os.makedirs(os.path.join(env['GDK_DBFARM'], 
TSTPREF + '_transient'))
-                            elif env.get('TRANS_INMEM'):
-                                cmd.append('--dbextra=:memory:')
-                            pSrvr = ServerClass(cmd,
-                                                open(os.path.join(TSTTRGDIR, 
'SingleServer.out'), 'a'),
-                                                open(os.path.join(TSTTRGDIR, 
'SingleServer.err'), 'a'),
-                                                0,
-                                                pollfile,
-                                                int(env['MAPIPORT']))
-                            os.chdir(TSTTRGDIR)
-                            pSrvr.LaunchIt()
-                        if global_timeout and start_time + global_timeout < 
time.time():
-                            if not testweb:
-                                print('\nGlobal testing timeout reached\n')
+                for TST,COND in testlist:
+                    if oneserver and (pSrvr is None or pSrvr.poll() is not 
None):
+                        # restart server
+                        inmem = single_in_memory
+                        for o in options:
+                            if o.startswith('embedded'):
+                                inmem = False
                                 break
-                            tt, FtOut, FtErr, bodyline, reason = 
0,F_SKIP,F_SKIP,None,"as the global timeout has been reached"
+                        if inmem:
+                            cmd = splitcommand(env['exe']['mserver5'][1]) + 
['--set', 'gdk_dbname=%s' % TSTDB, '--in-memory'] + options
+                            pollfile = None
                         else:
-                            os.environ['TST'] = TST
-                            tt, FtOut, FtErr, bodyline, reason, links = 
RunTest(env, TST, BusyPorts, COND, oktests, length, all_tests, pSrvr)
-                            alllinks.extend(links)
-                        if tt:
-                            t = "%7.3f" % tt
+                            cmd = splitcommand(env['exe']['mserver5'][1]) + 
['--dbpath=%s' % LogDBdir] + options
+                            pollfile = os.path.join(LogDBdir, '.started')
+                        if env.get('MULTIFARM'):
+                            cmd.append('--dbextra=%s' % 
os.path.join(env['GDK_DBFARM'], TSTPREF + '_transient'))
+                            shutil.rmtree(os.path.join(env['GDK_DBFARM'], 
TSTPREF + '_transient'),
+                                          ignore_errors = True)
+                            os.makedirs(os.path.join(env['GDK_DBFARM'], 
TSTPREF + '_transient'))
+                        elif env.get('TRANS_INMEM'):
+                            cmd.append('--dbextra=:memory:')
+                        pSrvr = ServerClass(cmd,
+                                            open(os.path.join(TSTTRGDIR, 
'SingleServer.out'), 'a'),
+                                            open(os.path.join(TSTTRGDIR, 
'SingleServer.err'), 'a'),
+                                            0,
+                                            pollfile,
+                                            int(env['MAPIPORT']))
+                        os.chdir(TSTTRGDIR)
+                        pSrvr.LaunchIt()
+                    if global_timeout and start_time + global_timeout < 
time.time():
+                        if not testweb:
+                            print('\nGlobal testing timeout reached\n')
+                            break
+                        tt, FtOut, FtErr, bodyline, reason = 
0,F_SKIP,F_SKIP,None,"as the global timeout has been reached"
+                    else:
+                        os.environ['TST'] = TST
+                        tt, FtOut, FtErr, bodyline, reason, links = 
RunTest(env, TST, BusyPorts, COND, oktests, length, all_tests, pSrvr)
+                        alllinks.extend(links)
+                    if tt:
+                        t = "%7.3f" % tt
+                    else:
+                        t = '-.---'
+                    TIMES.append((TSTDIR, TST, t, tt, FtOut, FtErr, reason))
+                    td += tt
+                    FdOut = max(FdOut,FtOut)
+                    FdErr = max(FdErr,FtErr)
+                    if bodyline is not None:
+                        if FtOut <= F_OK and FtErr <= F_OK:
+                            body_good.append(bodyline)
                         else:
-                            t = '-.---'
-                        TIMES.append((TSTDIR, TST, t, tt, FtOut, FtErr, 
reason))
-                        td += tt
-                        FdOut = max(FdOut,FtOut)
-                        FdErr = max(FdErr,FtErr)
-                        if bodyline is not None:
-                            if FtOut <= F_OK and FtErr <= F_OK:
-                                body_good.append(bodyline)
-                            else:
-                                body_bad.append(bodyline)
-                        if FtOut in (F_OK, F_WARN) and FtErr in (F_OK, F_WARN):
-                            oktests.append(TST)
-                except KeyboardInterrupt:
-                    print('\nInterrupted')
-                    interrupted = True
-            finally:
-                if pSrvr is not None:
-                    pSrvr.terminate()
-                    pSrvr = None
-                    o = open(os.path.join(TSTTRGDIR, 'SingleServer.out.html'), 
'w')
-                    o.write('<html><head><title>{} standard 
output</title></head>'
-                            '<body><pre>\n'.format(TSTDIR))
-                    e = F_OK
-                    for line in open(os.path.join(TSTTRGDIR, 
'SingleServer.out')):
-                        if line != '\n' and not line.startswith('#'):
-                            e = F_ERROR
-                            ssout = F_ERROR
-                        o.write(line.replace('&', '&amp;').replace('<', 
'&lt;').replace('>', '&gt;'))
-                    o.write('</pre></body></html>\n')
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to