Skip to content

Commit ecc7733

Browse files
authored
YQL-16241: [pg-make-test] Remove empty testcases from the resulting testsuite (#863)
1 parent bb77248 commit ecc7733

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ydb/library/yql/tools/pg-make-test/__main__.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,20 @@ def build(self, sqlfile):
160160
ressql = stmts
161161
resout = outs
162162

163+
if ressql is not None and resout is not None:
163164
LOGGER.info('Case built: %s', sqlfile.name)
164165
if is_split_logging:
165166
logger.info('Case built: %s', sqlfile.name)
166167

167-
if ressql is not None and resout is not None:
168168
save_strings(ressqlfile, ressql)
169169
save_strings(resoutfile, resout)
170+
else:
171+
LOGGER.warning('Case is empty: %s', sqlfile.name)
172+
if is_split_logging:
173+
logger.warning('Case is empty: %s', sqlfile.name)
174+
175+
ressqlfile.unlink(missing_ok=True)
176+
resoutfile.unlink(missing_ok=True)
170177

171178
return Path(sqlfile).stem, stmts_count, stmts_run, round(stmts_run * 100 / stmts_count, 2)
172179

0 commit comments

Comments
 (0)