Changeset: 1f00aade5a18 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1f00aade5a18
Modified Files:
        sql/odbc/tests/Tests/ODBCconnect.py
Branch: Aug2024
Log Message:

Show output of odbcconnect -l when test fails


diffs (23 lines):

diff --git a/sql/odbc/tests/Tests/ODBCconnect.py 
b/sql/odbc/tests/Tests/ODBCconnect.py
--- a/sql/odbc/tests/Tests/ODBCconnect.py
+++ b/sql/odbc/tests/Tests/ODBCconnect.py
@@ -101,6 +101,10 @@ class Execution:
             raise Exception(
                 f'Process exited with code {code!r}, expected {expected!r}')
 
+# Grab the output of 'odbcconnect -l' so we can show it if a test fails
+list_output = None
+ex = Execution('-l')
+list_output = ex.proc.stdout
 
 ex = None
 
@@ -112,6 +116,8 @@ def show_context():
         # ex.end()
         print(file=sys.stderr)
         print(ex.report(), file=sys.stderr)
+        if list_output:
+            print(f'\n--- output of odbcconnect -l ---\n{list_output}--- end 
---', file=sys.stderr)
 
 
 #######################################################################
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to