Changeset: f76cb41d726c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f76cb41d726c
Modified Files:
sql/server/rel_optimize_proj.c
testing/CMakeLists.txt
testing/Mtest.py.in
Branch: default
Log Message:
Merge with Aug2024 branch.
diffs (126 lines):
diff --git a/sql/server/rel_optimize_proj.c b/sql/server/rel_optimize_proj.c
--- a/sql/server/rel_optimize_proj.c
+++ b/sql/server/rel_optimize_proj.c
@@ -2960,7 +2960,7 @@ rel_groupjoin(visitor *v, sql_rel *rel)
return rel;
sql_rel *j = rel->l;
- if (!j || rel_is_ref(j) /*|| !is_left(j->op)*/ || j->op != op_join ||
list_length(rel->exps) > 1 /* only join because left joins aren't optimized jet
(TODO), only length 1 as implementation of groupjoins is missing */ ||
!list_empty(rel->attr))
+ if (!j || rel_is_ref(j) /*|| !is_left(j->op)*/ || j->op != op_join ||
list_length(rel->exps) > 1 /* only join because left joins aren't optimized yet
(TODO), only length 1 as implementation of groupjoins is missing */ ||
!list_empty(rel->attr))
return rel;
/* check group by exps == equi join exps */
list *gbes = rel->r;
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -111,10 +111,6 @@ configure_file(Mz.py.in
${CMAKE_CURRENT_BINARY_DIR}/Mz.py
@ONLY)
-configure_file(listexports.py.in
- ${CMAKE_CURRENT_BINARY_DIR}/listexports.py
- @ONLY)
-
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/Mtest.py
PERMISSIONS ${PROGRAM_PERMISSIONS_DEFAULT}
@@ -131,7 +127,7 @@ if(PYTHON3_LIBDIR)
install(FILES
process.py
__init__.py
- ${CMAKE_CURRENT_BINARY_DIR}/listexports.py
+ listexports.py
exportutils.py
melcheck.py
sqllogictest.py
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -782,7 +782,6 @@ def CreateHtmlIndex (env, ssout, sserr,
f = openutf8("%s.html" % INDEX, "w")
html.write(f, True)
f.close()
- env['_%s_BODY_' % TSTDIR] = ["", 0]
os.chdir(BACK)
### CreateHtmlIndex (env, ssout, sserr, *body) #
@@ -1108,13 +1107,13 @@ def AddTstToHtmlIndex (env, TST, STABLEo
td.addchildren(AddHref('.%s%s.html' % (TST, '.err'),
'%s_%s_body' % (DISTVER, TSTDIR),
'err', e))
- if '_%s_BODY_' % TSTDIR not in env or \
- not env['_%s_BODY_' % TSTDIR][0] or \
- ( (not env['_%s_BODY_' % TSTDIR][1]) and (o or e) ):
- if e and not o:
- env['_%s_BODY_' % TSTDIR] = [".%s.err.html" % TST, e]
+ if f'_{TSTDIR}_BODY_' not in env or \
+ 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]
else:
- env['_%s_BODY_' % TSTDIR] = [".%s.out.html" % TST, o]
+ env[f'_{TSTDIR}_BODY_'] = [".%s.out.html" % TST, o]
CreateSrcIndex(env, TST, EXT)
@@ -1128,7 +1127,7 @@ def AddSubToHtmlIndex (env, TSTDIR, diff
TSTDIR, diff))
if '__BODY_' not in env or \
not env['__BODY_'][0] or \
- ( (not env['__BODY_'][1]) and diff ):
+ env['__BODY_'][1] < diff:
env['__BODY_'] = ["%s/.index.html" % TSTDIR, diff]
return elem
### AddSubToHtmlIndex (env, TSTDIR, diff) #
@@ -1174,10 +1173,10 @@ def SkipTest(env, TST, EXT, REASON, leng
Element('a', {'href': '.%s.SKIPPED.html' % TST,
'target': target},
Text('(skipped)')))
- if '_%s_BODY_' % TSTDIR not in env or \
- not env['_%s_BODY_' % TSTDIR][0] or \
- not env['_%s_BODY_' % TSTDIR][1]:
- env['_%s_BODY_' % TSTDIR] = [".%s.SKIPPED.html" % TST, F_SKIP]
+ 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]
CreateSrcIndex(env, TST, EXT)
return td
### SkipTest(env, TST, EXT, REASON) #
diff --git a/testing/listexports.py.in b/testing/listexports.py
rename from testing/listexports.py.in
rename to testing/listexports.py
--- a/testing/listexports.py.in
+++ b/testing/listexports.py
@@ -32,7 +32,11 @@ skipdirs = ['extras']
skipfiles = ['monet_getopt.h']
# where the files are
-srcdir = r'@SOURCE@'
+srcdir = os.environ.get('TSTSRCBASE')
+if not srcdir:
+ print('cannot find source directory (TSTSRCBASE environment variable)',
+ file=sys.stderr)
+ sys.exit(1)
# the export command; note the keyword we look for is a word that ends
# in "export"
@@ -71,7 +75,7 @@ def mywalk(d):
return [(root, [], [file])]
return os.walk(d)
-def findfiles(dirlist, skipfiles = [], skipdirs = []):
+def findfiles(dirlist, skipfiles=[], skipdirs=[]):
decls = []
done = {}
for d in dirlist:
@@ -95,7 +99,7 @@ def listexports():
for lib in libs:
dirs = dirlist[lib]
dl = [os.path.join(srcdir, d) for d in dirs]
- decls = findfiles(dl, skipfiles = skipfiles, skipdirs = skipdirs)
+ decls = findfiles(dl, skipfiles=skipfiles, skipdirs=skipdirs)
output.append(f'# {lib}\n')
for d in decls:
output.append(d + '\n')
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]