Changeset: c958540b6521 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c958540b6521
Modified Files:
testing/Mtest.py.in
Branch: Aug2024
Log Message:
Cleanup. Remove --RUBYCLIENT option.
diffs (truncated from 1524 to 300 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -123,7 +123,7 @@ if isatty:
res =
ctypes.windll.kernel32.GetConsoleScreenBufferInfo(handle, csbi)
assert res
(bufx, bufy, curx, cury, wattr,
- left, top, right, bottom, maxx, maxy) =
struct.unpack("hhhhHhhhhhh", csbi.raw)
+ left, top, right, bottom, maxx, maxy) =
struct.unpack('hhhhHhhhhhh', csbi.raw)
return wattr
reset = get_csbi_attributes(handle)
def prred(str,
@@ -273,16 +273,16 @@ def remove(file):
Warn(f'could not remove {file}')
def isexecutable(TST, ext = '.sh') :
- if os.name == "nt":
- for ext in ".exe", ".com", ".bat", ".cmd":
+ if os.name == 'nt':
+ for ext in '.exe', '.com', '.bat', '.cmd':
if TST.lower().endswith(ext):
ext = ''
- if os.path.isfile(TST+ext) or os.path.isfile(TST+ext+".src"):
+ if os.path.isfile(TST+ext) or os.path.isfile(TST+ext+'.src'):
return (True, ext)
- elif os.name == "posix":
+ elif os.name == 'posix':
TST += ext
if ( os.path.isfile(TST ) and os.access(TST ,os.X_OK) ) or
\
- ( os.path.isfile(TST+".src") and os.access(TST+".src",os.X_OK) ):
+ ( os.path.isfile(TST+'.src') and os.access(TST+'.src',os.X_OK) ):
return (True, ext)
return (False, '')
### isexecutable(TST, ext = '.sh') #
@@ -292,7 +292,7 @@ def CheckExec(cmd) :
x = isexecutable(os.path.join(p,cmd),'')
if x[0]:
return os.path.join(p, cmd + x[1])
- return ""
+ return ''
### CheckExec(cmd) #
import argparse
@@ -302,16 +302,16 @@ import threading
(F_SKIP, F_OK, F_WARN, F_SOCK, F_ERROR, F_TIME, F_ABRT, F_RECU, F_SEGV,
F_FAIL) = range(10)
FAILURES = {
- F_SKIP : ("F_SKIP", '-'),
- F_OK : ("F_OK", 'o'),
- F_WARN : ("F_WARN", 'x'),
- F_SOCK : ("F_SOCK", 'S'),
- F_ERROR : ("F_ERROR", 'X'),
- F_TIME : ("F_TIME", 'T'),
- F_ABRT : ("F_ABRT", 'A'),
- F_RECU : ("F_RECU", 'R'),
- F_SEGV : ("F_SEGV", 'C'),
- F_FAIL : ("F_FAIL", 'F'),
+ F_SKIP : ('F_SKIP', '-'),
+ F_OK : ('F_OK', 'o'),
+ F_WARN : ('F_WARN', 'x'),
+ F_SOCK : ('F_SOCK', 'S'),
+ F_ERROR : ('F_ERROR', 'X'),
+ F_TIME : ('F_TIME', 'T'),
+ F_ABRT : ('F_ABRT', 'A'),
+ F_RECU : ('F_RECU', 'R'),
+ F_SEGV : ('F_SEGV', 'C'),
+ F_FAIL : ('F_FAIL', 'F'),
}
CONDITIONALS = {
@@ -320,28 +320,28 @@ CONDITIONALS = {
# from configure.ag:
# These should cover all AM_CONDITIONALS defined in configure.ag, i.e.,
# `grep AM_CONDITIONAL configure.ag | sed
's|^AM_CONDITIONAL(\([^,]*\),.*$|\1|' | sort -u`
- 'HAVE_CUDF' : "@HAVE_CUDF_FALSE@",
- 'HAVE_CURL' : "@HAVE_CURL_FALSE@",
- 'HAVE_FITS' : "@HAVE_FITS_FALSE@",
- 'HAVE_GEOM' : "@HAVE_GEOM_FALSE@",
- 'HAVE_HGE' : "@HAVE_HGE_FALSE@",
- 'HAVE_LIBBZ2' : "@HAVE_LIBBZ2_FALSE@",
- 'HAVE_LIBLZ4' : "@HAVE_LIBLZ4_FALSE@",
- 'HAVE_LIBLZMA' : "@HAVE_LIBLZMA_FALSE@",
- 'HAVE_LIBPCRE' : "@HAVE_LIBPCRE_FALSE@",
- 'HAVE_LIBPY3' : "@HAVE_LIBPY3_FALSE@",
- 'HAVE_LIBR' : "@HAVE_LIBR_FALSE@",
- 'HAVE_LIBXML' : "@HAVE_LIBXML_FALSE@",
- 'HAVE_LIBZ' : "@HAVE_LIBZ_FALSE@",
- 'HAVE_NETCDF' : "@HAVE_NETCDF_FALSE@",
- 'HAVE_ODBC' : "@HAVE_ODBC_FALSE@",
- 'HAVE_OPENSSL' : "@HAVE_OPENSSL_FALSE@",
- 'HAVE_PROJ' : "@HAVE_PROJ_FALSE@",
- 'HAVE_SHP' : "@HAVE_SHP_FALSE@",
- 'HAVE_GETENTROPY' : "@HAVE_GETENTROPY_FALSE@",
- 'NATIVE_WIN32' : "@NATIVE_WIN32_FALSE@",
- 'NOT_WIN32' : "@NOT_WIN32_FALSE@",
- 'SANITIZER' : "@SANITIZER_FALSE@",
+ 'HAVE_CUDF' : '@HAVE_CUDF_FALSE@',
+ 'HAVE_CURL' : '@HAVE_CURL_FALSE@',
+ 'HAVE_FITS' : '@HAVE_FITS_FALSE@',
+ 'HAVE_GEOM' : '@HAVE_GEOM_FALSE@',
+ 'HAVE_HGE' : '@HAVE_HGE_FALSE@',
+ 'HAVE_LIBBZ2' : '@HAVE_LIBBZ2_FALSE@',
+ 'HAVE_LIBLZ4' : '@HAVE_LIBLZ4_FALSE@',
+ 'HAVE_LIBLZMA' : '@HAVE_LIBLZMA_FALSE@',
+ 'HAVE_LIBPCRE' : '@HAVE_LIBPCRE_FALSE@',
+ 'HAVE_LIBPY3' : '@HAVE_LIBPY3_FALSE@',
+ 'HAVE_LIBR' : '@HAVE_LIBR_FALSE@',
+ 'HAVE_LIBXML' : '@HAVE_LIBXML_FALSE@',
+ 'HAVE_LIBZ' : '@HAVE_LIBZ_FALSE@',
+ 'HAVE_NETCDF' : '@HAVE_NETCDF_FALSE@',
+ 'HAVE_ODBC' : '@HAVE_ODBC_FALSE@',
+ 'HAVE_OPENSSL' : '@HAVE_OPENSSL_FALSE@',
+ 'HAVE_PROJ' : '@HAVE_PROJ_FALSE@',
+ 'HAVE_SHP' : '@HAVE_SHP_FALSE@',
+ 'HAVE_GETENTROPY' : '@HAVE_GETENTROPY_FALSE@',
+ 'NATIVE_WIN32' : '@NATIVE_WIN32_FALSE@',
+ 'NOT_WIN32' : '@NOT_WIN32_FALSE@',
+ 'SANITIZER' : '@SANITIZER_FALSE@',
# unknown at compile time;
# hence, we set them only at runtime in main() below
'KNOWNFAIL' : False, # normally skip, but --alltests or explicit
@@ -561,7 +561,7 @@ TIMES = []
def ErrMsg(TEXT) :
print(end='', flush=True)
- print("\n%s: ERROR: %s\n" % (THISFILE, TEXT), file=sys.stderr,
flush=True)
+ print('\n%s: ERROR: %s\n' % (THISFILE, TEXT), file=sys.stderr,
flush=True)
### ErrMsg(TEXT) #
def ErrXit(TEXT) :
@@ -575,7 +575,7 @@ def Warn(TEXT) :
except IOError:
pass
try:
- print("\n%s Warning: %s\n" % (THISFILE, TEXT), file=sys.stderr,
flush=True)
+ print('\n%s Warning: %s\n' % (THISFILE, TEXT), file=sys.stderr,
flush=True)
except IOError:
pass
### Warn(TEXT) #
@@ -610,9 +610,9 @@ def CreateHtmlIndex (env, ssout, sserr,
TSTTRGDIR=env['TSTTRGDIR']
if TSTDIR:
- INDEX=".index"
+ INDEX='.index'
else:
- INDEX="index"
+ INDEX='index'
if body:
BACK = os.getcwd()
@@ -669,16 +669,16 @@ def CreateHtmlIndex (env, ssout, sserr,
Element('title', {}, Text(HTMLTITLE)),
stylesheet),
hbody)
- f = openutf8("%s.head.html" % INDEX,"w")
+ f = openutf8('%s.head.html' % INDEX,'w')
html.write(f, True)
f.close()
if TSTDIR:
layout = 'rows'
- ROWS="8%"
+ ROWS='8%'
else:
layout = 'cols'
- ROWS="10%"
+ ROWS='10%'
html = Element('html', {},
Element('head', {},
Element('meta', {'charset':'utf8'}),
@@ -706,7 +706,7 @@ def CreateHtmlIndex (env, ssout, sserr,
'bordercolor': white,
'marginwidth': '0',
'marginheight': '0'})))
- f = openutf8("%s.html" % INDEX, "w")
+ f = openutf8('%s.html' % INDEX, 'w')
html.write(f, True)
f.close()
os.chdir(BACK)
@@ -745,7 +745,7 @@ def CreateTstWhatXhtml (env, TST, stable
else:
diffclass = 'error'
- SYSTEM = "%s:" % DISTVER
+ SYSTEM = '%s:' % DISTVER
html = Element('html', {},
Element('head', {},
@@ -773,10 +773,10 @@ def CreateTstWhatXhtml (env, TST, stable
'bordercolor': white,
'marginwidth': '0',
'marginheight': '0'})))
- f = openutf8(".%s%s.html" % (TST, WHAT), "w")
+ f = openutf8('.%s%s.html' % (TST, WHAT), 'w')
html.write(f, True)
f.close()
- f = openutf8(".%s%s.head.html" % (TST, WHAT),"w")
+ f = openutf8('.%s%s.head.html' % (TST, WHAT),'w')
target = '%s_%s_%s_%s_body' % (DISTVER, TSTDIR, TST, WHAT[1:])
if REV: # implies URLPREFIX is not None
urlpref = '%s%s/%s' % (URLPREFIX, url(TSTDIR), TSTSUFF)
@@ -886,7 +886,7 @@ def CreateSrcIndex (env, TST, EXT) :
if REV:
framesrc = '%s%s/%s/%s%s' % (URLPREFIX, url(TSTDIR), TSTSUFF, TST, EXT)
else:
- f = openutf8(".%s.nosrc.index.html" % TST, "w")
+ f = openutf8('.%s.nosrc.index.html' % TST, 'w')
html = Element('html', {},
Element('head', {},
Element('title', {},
@@ -927,7 +927,7 @@ def CreateSrcIndex (env, TST, EXT) :
'bordercolor': white,
'marginwidth': '0',
'marginheight': '0'})))
- f = openutf8(".%s.src.index.html" % TST,"w")
+ f = openutf8('.%s.src.index.html' % TST,'w')
html.write(f, True)
f.close()
@@ -962,7 +962,7 @@ def CreateSrcIndex (env, TST, EXT) :
'cellspacing': '0',
'cellpadding': '3'},
tr))))
- f = openutf8(".%s.src.index.head.html" % TST, "w")
+ f = openutf8('.%s.src.index.head.html' % TST, 'w')
html.write(f, True)
f.close()
### CreateSrcIndex (env, TST, EXT) #
@@ -1027,7 +1027,7 @@ def AddTstToHtmlIndex (env, TST, STABLEo
td.addchildren(AddHref('.%s%s.html' % (TST, '.out'),
'%s_%s_body' % (DISTVER, TSTDIR),
'out', o))
- td.addchild(Text(" | ", raw = True))
+ td.addchild(Text(' | ', raw = True))
td.addchildren(AddHref('.%s%s.html' % (TST, '.err'),
'%s_%s_body' % (DISTVER, TSTDIR),
'err', e))
@@ -1035,9 +1035,9 @@ def AddTstToHtmlIndex (env, TST, STABLEo
not env[f'_{TSTDIR}_BODY_'][0] or \
env[f'_{TSTDIR}_BODY_'][1] < max(e, o):
if e > o:
- env[f'_{TSTDIR}_BODY_'] = [".%s.err.html" % TST, e]
+ env[f'_{TSTDIR}_BODY_'] = ['.%s.err.html' % TST, e]
else:
- env[f'_{TSTDIR}_BODY_'] = [".%s.out.html" % TST, o]
+ env[f'_{TSTDIR}_BODY_'] = ['.%s.out.html' % TST, o]
CreateSrcIndex(env, TST, EXT)
@@ -1052,13 +1052,13 @@ def AddSubToHtmlIndex (env, TSTDIR, diff
if '__BODY_' not in env or \
not env['__BODY_'][0] or \
env['__BODY_'][1] < diff:
- env['__BODY_'] = ["%s/.index.html" % TSTDIR, diff]
+ env['__BODY_'] = ['%s/.index.html' % TSTDIR, diff]
return elem
### AddSubToHtmlIndex (env, TSTDIR, diff) #
def SkipTest(env, TST, EXT, REASON, length) :
TSTDIR = env['TSTDIR']
- TEXT = "Skipping test %s%s %s" % (TST, EXT, REASON)
+ TEXT = 'Skipping test %s%s %s' % (TST, EXT, REASON)
if verbosity > 1:
Warn(TEXT)
elif verbosity == 1:
@@ -1068,7 +1068,7 @@ def SkipTest(env, TST, EXT, REASON, leng
REASON = REASON[:-1]
if length + 10 + len(REASON) + 11 > ttywidth:
# 10 - length of prompt()
- # 11 - length of " skipped ()"
+ # 11 - length of ' skipped ()'
l = ttywidth - 10 - 11 - len(REASON)
if len(TST) <= l:
s = '%-*s' % (l, TST)
@@ -1081,11 +1081,11 @@ def SkipTest(env, TST, EXT, REASON, leng
if testweb or not produce_html:
return None
- f = openutf8(".%s.SKIPPED.html" % TST, "w")
+ f = openutf8('.%s.SKIPPED.html' % TST, 'w')
Element('html', {},
Element('body', {},
Element('p', {},
- Text("%s Warning: %s" % (THISFILE,
TEXT))))).write(f, newline=True)
+ Text('%s Warning: %s' % (THISFILE,
TEXT))))).write(f, newline=True)
f.close()
target = '%s_%s_body' % (DISTVER, TSTDIR)
td = Element('td', {'class': 'header'},
@@ -1100,7 +1100,7 @@ def SkipTest(env, TST, EXT, REASON, leng
if f'_{TSTDIR}_BODY_' not in env or \
not env[f'_{TSTDIR}_BODY_'][0] or \
not env[f'_{TSTDIR}_BODY_'][1]:
- env[f'_{TSTDIR}_BODY_'] = [".%s.SKIPPED.html" % TST, F_SKIP]
+ env[f'_{TSTDIR}_BODY_'] = ['.%s.SKIPPED.html' % TST, F_SKIP]
CreateSrcIndex(env, TST, EXT)
return td
### SkipTest(env, TST, EXT, REASON) #
@@ -1113,9 +1113,9 @@ def find_test_dirs(thisdir, recursive=Tr
testdirs = []
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]