Changeset: 5051a429b750 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5051a429b750
Modified Files:
        sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
        sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
        sql/test/Tests/null-byte-hang.SQL.py
        sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
        sql/test/testdb-reload/Tests/reload.py
Branch: Jan2022
Log Message:

Don't include unix path separators on paths to be joined


diffs (97 lines):

diff --git a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py 
b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
--- a/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
+++ b/sql/jdbc/tests/Tests/Test_JdbcClient.SQL.py
@@ -21,14 +21,14 @@ if __name__ == '__main__':
     except CalledProcessError as e:
         raise SystemExit(e.stderr)
 
-    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/JdbcClient_create_tables.sql')]
+    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'JdbcClient_create_tables.sql')]
     try:
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
     except CalledProcessError as e:
         print(e.stderr, file=sys.stderr)
         raise SystemExit('ERROR: failed to create tables!')
 
-    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/JdbcClient_inserts_selects.sql')]
+    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'JdbcClient_inserts_selects.sql')]
     try:
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
     except CalledProcessError as e:
@@ -41,7 +41,7 @@ if __name__ == '__main__':
     except CalledProcessError as e:
         raise SystemExit(e.stderr)
 
-    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/JdbcClient_drop_tables.sql')]
+    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'JdbcClient_drop_tables.sql')]
     try:
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
     except CalledProcessError as e:
@@ -49,16 +49,16 @@ if __name__ == '__main__':
 
     try:
         # test the ON CLIENT download/export functionality via JdbcClient with 
--csvdir argument (to enable the ON CLIENT functionality)
-        cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, 
'--csvdir', os.path.join(TSTSRCBASE, TSTDIR, 'Tests'), '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/OnClientDownloadData.sql')]
+        cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, 
'--csvdir', os.path.join(TSTSRCBASE, TSTDIR, 'Tests'), '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'OnClientDownloadData.sql')]
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
         # test the ON CLIENT upload/import functionality via JdbcClient with 
--csvdir argument (to enable the ON CLIENT functionality)
-        cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, 
'--csvdir', os.path.join(TSTSRCBASE, TSTDIR, 'Tests'), '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/OnClientUploadData.sql')]
+        cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, 
'--csvdir', os.path.join(TSTSRCBASE, TSTDIR, 'Tests'), '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'OnClientUploadData.sql')]
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
     except CalledProcessError as e:
         sys.stderr.write(str(e))
     finally:
         # cleanup created data export files from Tests/DownloadData.sql
-        for tfile in glob.glob(os.path.join(TSTSRCBASE, TSTDIR, 
'Tests/sys_tables_by_id.*')):
+        for tfile in glob.glob(os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 
'sys_tables_by_id.*')):
             os.remove(tfile)
 
 #set -e
diff --git a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py 
b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
--- a/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
+++ b/sql/jdbc/tests/Tests/ValidateSystemCatalogTables.SQL.py
@@ -14,7 +14,7 @@ PASSWORD='monetdb'
 if __name__ == '__main__':
     with open(os.path.join('.monetdb'), 'w') as f:
         f.write('\n'.join(['user=monetdb', 'password=monetdb']))
-    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/ValidateSystemCatalogTables.sql')]
+    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'ValidateSystemCatalogTables.sql')]
     try:
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
         sys.stderr.write(p.stdout)
diff --git a/sql/test/Tests/null-byte-hang.SQL.py 
b/sql/test/Tests/null-byte-hang.SQL.py
--- a/sql/test/Tests/null-byte-hang.SQL.py
+++ b/sql/test/Tests/null-byte-hang.SQL.py
@@ -3,7 +3,7 @@ import os, sys, pymonetdb
 
 client1 = pymonetdb.connect(port=int(os.getenv('MAPIPORT')), 
database=os.getenv('TSTDB'))
 cur1 = client1.cursor()
-f = open(os.path.join(os.getenv('TSTSRCBASE'), os.getenv('TSTDIR'), 
'Tests/null-byte-hang.sql'), 'r')
+f = open(os.path.join(os.getenv('TSTSRCBASE'), os.getenv('TSTDIR'), 'Tests', 
'null-byte-hang.sql'), 'r')
 q = f.read()
 f.close()
 try:
diff --git a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py 
b/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
--- a/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
+++ b/sql/test/sys-schema/Tests/ValidateSystemCatalogTables.SQL.py
@@ -14,7 +14,7 @@ PASSWORD='monetdb'
 if __name__ == '__main__':
     with open(os.path.join('.monetdb'), 'w') as f:
         f.write('\n'.join(['user=monetdb', 'password=monetdb']))
-    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests/ValidateSystemCatalogTables.sql')]
+    cmd = ['java', CLIENT, '-h', HOST, '-p', MAPIPORT, '-d', TSTDB, '-f', 
os.path.join(TSTSRCBASE, TSTDIR, 'Tests', 'ValidateSystemCatalogTables.sql')]
     try:
         p = run(cmd, stdout=PIPE, stderr=PIPE, check=True, encoding='utf-8')
         sys.stderr.write(p.stdout)
diff --git a/sql/test/testdb-reload/Tests/reload.py 
b/sql/test/testdb-reload/Tests/reload.py
--- a/sql/test/testdb-reload/Tests/reload.py
+++ b/sql/test/testdb-reload/Tests/reload.py
@@ -83,7 +83,7 @@ if len(sys.argv) == 2 and sys.argv[1] ==
     output = ''.join(d2out).splitlines(keepends=True)
     while len(output) > 0 and output[0].startswith('--'):
         del output[0]
-    stableout = os.path.join(tstsrcdir, 
'../../testdb/Tests/dump-nogeom.stable.out')
+    stableout = os.path.join(tstsrcdir, '..', '..', 'testdb', 'Tests', 
'dump-nogeom.stable.out')
     stable = open(stableout, encoding='utf-8').readlines()
     import difflib
     for line in difflib.unified_diff(stable, output, fromfile='test', 
tofile=stableout):
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to