Changeset: 759d47d845fe for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/759d47d845fe
Modified Files:
        testing/Mtest.py.in
Branch: default
Log Message:

Merge with Jan2022 branch.


diffs (83 lines):

diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4358,7 +4358,7 @@ read_into_cache(MapiHdl hdl, int lookahe
        for (;;) {
                line = read_line(mid);
                if (line == NULL) {
-                       if (mnstr_eof(mid->from)) {
+                       if (mid->from && mnstr_eof(mid->from)) {
                                mapi_log_record(mid, "unexpected end of file");
                                mapi_log_record(mid, __func__);
                                close_connection(mid);
diff --git a/documentation/source/developers_handbook.rst 
b/documentation/source/developers_handbook.rst
--- a/documentation/source/developers_handbook.rst
+++ b/documentation/source/developers_handbook.rst
@@ -120,7 +120,7 @@ Consider the following single client con
 Alternatively existing ``.sql`` scripts can be converted to sqllogic tests 
(.test) with ``Mconvert.py``.
 For example::
 
-    $Mconvert.py  --auto <module>/Tests <convert_me>.sql
+    $ Mconvert.py  --auto <module>/Tests <convert_me>.sql
 
 All new tests need to be placed in the appropriate test folder and their name 
respectively in the
 index ``All`` file.
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -301,7 +301,7 @@ def splitcommand(cmd):
 def remove(file):
     try:
         os.remove(file)
-    except FileNotFound:
+    except FileNotFoundError:
         pass
     except:
         Warn('could not remove {}'.format(file))
@@ -643,7 +643,7 @@ def startswithpath(str,pre) :
 ##def url(str) :
 ##    return str.replace(os.sep, '/')
 ### url(str) #
-import urllib.request
+import urllib.request, urllib.parse
 path = urllib.request.url2pathname
 def url(str) :
     url = urllib.request.pathname2url(str)
@@ -2294,6 +2294,16 @@ def RunTest(env, TST, COND, oktests, len
             else:
                 diff_html.write('<!--NoDiffs-->\n')
             diff_html.close()
+        elif FailedOut > F_WARN or FailedErr > F_WARN:
+            print()
+            print('========================================')
+            prred('ERROR: ')
+            print(os.path.join(TSTDIR, TST + EXT))
+            print('========================================')
+            with openutf8(TestErrFile, 'r') as f:
+                print(f.read())
+            print()
+
         if FailedOut == F_OK and FailedErr == F_OK and testweb:
             for f in ['%s.out.diff.html' % TST, '%s.test.out' % TST,
                       '%s.server.out' % TST, '%s.client.out' % TST,
@@ -4117,6 +4127,8 @@ VALUES (%s, '%s', '%s', '%s',
                 prgreen('OK')
             print()
             print('failed={}, skipped={}'.format(Failed, len(Failure[F_SKIP])))
+            if produce_html and Failed:
+                print('see 
{}'.format(urllib.parse.urlunsplit(('file','',urllib.request.pathname2url(os.path.join(TSTTRGBASE,
 TSTPREF, "index.html")),'',''))))
             print('Ran {} tests in {:7.3f}s'.format(num_tests - 
len(Failure[F_SKIP]), t_))
         elif Failed:
             print("""\
diff --git a/testing/SQLogicConvertNotes b/testing/SQLogicConvertNotes
--- a/testing/SQLogicConvertNotes
+++ b/testing/SQLogicConvertNotes
@@ -2,7 +2,7 @@ Mconvert.py
 -----------
 Converts one test folder at the time. Only relevant option is `--auto`. When 
present a sqlogic test will be created for each matching .sql test. By default 
prints all to stdout. As initial dry run probably is a good idea to run without 
`--auto` option to see whether something goes wrong. 
 
-$Mconvert.py --auto sql/test/BugTracker-2008 
+$ Mconvert.py --auto sql/test/BugTracker-2008
 
 (deprecated) testing/convert_to_sqllogic.sh 
 ------------------------------
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to