Changeset: 78841fbb0397 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=78841fbb0397 Modified Files: sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py sql/test/emptydb-upgrade-chain/Tests/upgrade.py sql/test/emptydb-upgrade-hge/Tests/upgrade.py sql/test/emptydb-upgrade/Tests/upgrade.py sql/test/emptydb/Tests/check.SQL.py sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py sql/test/testdb-upgrade-chain/Tests/upgrade.py sql/test/testdb-upgrade-hge/Tests/upgrade.py sql/test/testdb-upgrade/Tests/upgrade.py Branch: default Log Message:
Exit with non-zero error status if there was an error. diffs (227 lines): diff --git a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -71,7 +73,11 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 if len(cltout) != 2 or cltout[0] != 'START TRANSACTION;' or cltout[1] != 'COMMIT;': sys.stderr.writelines(cltout) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-chain/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-chain/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -71,7 +73,11 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 if len(cltout) != 2 or cltout[0] != 'START TRANSACTION;' or cltout[1] != 'COMMIT;': sys.stderr.writelines(cltout) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py --- a/sql/test/emptydb-upgrade-hge/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade-hge/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -71,7 +73,11 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 if len(cltout) != 2 or cltout[0] != 'START TRANSACTION;' or cltout[1] != 'COMMIT;': sys.stderr.writelines(cltout) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/emptydb-upgrade/Tests/upgrade.py b/sql/test/emptydb-upgrade/Tests/upgrade.py --- a/sql/test/emptydb-upgrade/Tests/upgrade.py +++ b/sql/test/emptydb-upgrade/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -71,7 +73,11 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 if len(cltout) != 2 or cltout[0] != 'START TRANSACTION;' or cltout[1] != 'COMMIT;': sys.stderr.writelines(cltout) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/emptydb/Tests/check.SQL.py b/sql/test/emptydb/Tests/check.SQL.py --- a/sql/test/emptydb/Tests/check.SQL.py +++ b/sql/test/emptydb/Tests/check.SQL.py @@ -4,6 +4,7 @@ try: except ImportError: import process +xit = 0 output = [] with process.client('sql', format='csv', echo=False, @@ -28,6 +29,8 @@ with process.client('sql', format='csv', output.append(out) sys.stderr.write(err) + if err: + xit = 1 with process.client('sql', interactive=True, stdin=process.PIPE, stdout=process.PIPE, stderr=process.PIPE) as clt: @@ -59,6 +62,8 @@ with process.client('sql', interactive=T output.append(out) sys.stderr.write(err) + if err: + xit = 1 # add queries to dump the system tables, but avoid dumping IDs since # they are too volatile, and if it makes sense, dump an identifier @@ -185,6 +190,8 @@ with process.client('sql', interactive=T output.append(out) sys.stderr.write(err) + if err: + xit = 1 if len(sys.argv) == 2 and sys.argv[1] == 'check': output = ''.join(output).splitlines(keepends=True) @@ -193,5 +200,8 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, output, fromfile='test', tofile=stableout): sys.stderr.write(line) + xit = 1 else: sys.stdout.writelines(output) + +sys.exit(xit) diff --git a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py --- a/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-chain-hge/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -72,5 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/testdb-upgrade-chain/Tests/upgrade.py b/sql/test/testdb-upgrade-chain/Tests/upgrade.py --- a/sql/test/testdb-upgrade-chain/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-chain/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -72,5 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/testdb-upgrade-hge/Tests/upgrade.py b/sql/test/testdb-upgrade-hge/Tests/upgrade.py --- a/sql/test/testdb-upgrade-hge/Tests/upgrade.py +++ b/sql/test/testdb-upgrade-hge/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -72,5 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) diff --git a/sql/test/testdb-upgrade/Tests/upgrade.py b/sql/test/testdb-upgrade/Tests/upgrade.py --- a/sql/test/testdb-upgrade/Tests/upgrade.py +++ b/sql/test/testdb-upgrade/Tests/upgrade.py @@ -13,6 +13,8 @@ import sys import os import zipfile +xit = 0 + # find zipped database dbfarm = os.environ['GDK_DBFARM'] db = os.path.join(dbfarm, os.environ['TSTDB']) @@ -72,5 +74,8 @@ if len(sys.argv) == 2 and sys.argv[1] == import difflib for line in difflib.unified_diff(stable, srvout, fromfile='test', tofile=f): sys.stderr.write(line) + xit = 1 else: sys.stdout.writelines(srvout) + +sys.exit(xit) _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list