Changeset: 6b1ab89eaf67 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/6b1ab89eaf67
Modified Files:
sql/test/Tests/All
testing/Mtest.py.in
Branch: default
Log Message:
Implemented Python version check in Mtest.
diffs (51 lines):
diff --git a/sql/test/Tests/All b/sql/test/Tests/All
--- a/sql/test/Tests/All
+++ b/sql/test/Tests/All
@@ -130,7 +130,7 @@ HAVE_LIBBZ2&!NOWAL?hot_snapshot_bz2
HAVE_LIBLZMA&!NOWAL?hot_snapshot_xz
HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4
!HAVE_PYTHON_LZ4&HAVE_LIBLZ4&!NOWAL?hot_snapshot_lz4_lite
-HAVE_PYTHON_LZ4&HAVE_LIBLZ4?hot_snapshot_huge_file
+HAVE_PYTHON_LZ4&HAVE_LIBLZ4&PYTHON_VERSION>=3.7?hot_snapshot_huge_file
# The following tests are some old tests moved from sql/test
## FOREIGN KEY reference to the same table
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2116,6 +2116,35 @@ def RunTest(env, TST, COND, oktests, len
elem = SkipTest(env, TST, EXT, reason, length)
if reason is not None:
break
+ elif cond.startswith('PYTHON_VERSION>='):
+ req_vers = cond[16:].split('.')
+ if not negate:
+ for i in range(3):
+ if i >= len(req_vers):
+ break
+ if int(sys.version_info[i]) > int(req_vers[i]):
+ break
+ if int(sys.version_info[i]) < int(req_vers[i]):
+ reason = "Python version too low"
+ elem = SkipTest(env, TST, EXT, reason, length)
+ break
+ else:
+ for i in range(3):
+ if i >= len(req_vers):
+ reason = "Python version too high"
+ elem = SkipTest(env, TST, EXT, reason, length)
+ break
+ if int(sys.version_info[i]) < int(req_vers[i]):
+ break
+ if int(sys.version_info[i]) > int(req_vers[i]):
+ reason = "Python version too high"
+ elem = SkipTest(env, TST, EXT, reason, length)
+ break
+ else:
+ reason = "Python version too high"
+ elem = SkipTest(env, TST, EXT, reason, length)
+ if reason is not None:
+ break
elif cond.startswith('R_VERSION>='):
rversion = os.path.join('@LIBR_INCLUDE_DIRS@', 'Rversion.h')
if os.path.exists(rversion):
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]