Changeset: 626ee3024b3c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/626ee3024b3c
Modified Files:
sql/backends/monet5/Tests/All
testing/Mtest.py.in
Branch: Jan2022
Log Message:
Reverse R version test and add negation to the mix.
This way, the test is the same as the one for GEOS.
diffs (47 lines):
diff --git a/sql/backends/monet5/Tests/All b/sql/backends/monet5/Tests/All
--- a/sql/backends/monet5/Tests/All
+++ b/sql/backends/monet5/Tests/All
@@ -9,7 +9,7 @@ HAVE_LIBR&NOT_WIN32?rapi06
HAVE_LIBR&NOT_WIN32?rapi07
#HAVE_LIBR&NOT_WIN32?rapi08
HAVE_LIBR&NOT_WIN32?rapi09
-HAVE_LIBR&NOT_WIN32&R_VERSION<4.2.0?rapi09a
+HAVE_LIBR&NOT_WIN32&!R_VERSION>=4.2.0?rapi09a
HAVE_LIBR&NOT_WIN32?rapi10
HAVE_LIBR&NOT_WIN32?rapi12
HAVE_LIBR&NOT_WIN32?rapi13
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2027,19 +2027,25 @@ def RunTest(env, TST, COND, oktests, len
break
if reason is not None:
break
- elif cond.startswith('R_VERSION<'):
+ elif cond.startswith('R_VERSION>='):
rversion = os.path.join('@LIBR_INCLUDE_DIRS@', 'Rversion.h')
if os.path.exists(rversion):
with openutf8(rversion, 'r') as f:
res = re.search('#define R_VERSION (?P<rversion>\d+)',
f.read())
if res is not None:
r_version = res.group('rversion')
- req_version = cond[10:].split('.')
+ req_version = cond[11:].split('.')
req_version = int(req_version[0]) * 65536 +
int(req_version[1]) * 256 + int(req_version[2])
- if int(r_version) >= req_version:
- reason = "R version too high"
- elem = SkipTest(env, TST, EXT, reason, length)
- break
+ if not negate:
+ if int(r_version) < req_version:
+ reason = "R version too low"
+ elem = SkipTest(env, TST, EXT, reason,
length)
+ break
+ else:
+ if int(r_version) >= req_version:
+ reason = "R version too high"
+ elem = SkipTest(env, TST, EXT, reason,
length)
+ break
elif cond not in CONDITIONALS:
reason = "as conditional '%s' is unknown." % cond
elem = SkipTest(env, TST, EXT, reason, length)
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]