From ecc773391495d8bef17eedb205db0b56fb261cce Mon Sep 17 00:00:00 2001 From: Mars Agliullin Date: Mon, 8 Jan 2024 17:49:43 +0300 Subject: [PATCH] YQL-16241: [pg-make-test] Remove empty testcases from the resulting testsuite (#863) --- ydb/library/yql/tools/pg-make-test/__main__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ydb/library/yql/tools/pg-make-test/__main__.py b/ydb/library/yql/tools/pg-make-test/__main__.py index ddf2c7b1494e..63303bb09961 100644 --- a/ydb/library/yql/tools/pg-make-test/__main__.py +++ b/ydb/library/yql/tools/pg-make-test/__main__.py @@ -160,13 +160,20 @@ def build(self, sqlfile): ressql = stmts resout = outs + if ressql is not None and resout is not None: LOGGER.info('Case built: %s', sqlfile.name) if is_split_logging: logger.info('Case built: %s', sqlfile.name) - if ressql is not None and resout is not None: save_strings(ressqlfile, ressql) save_strings(resoutfile, resout) + else: + LOGGER.warning('Case is empty: %s', sqlfile.name) + if is_split_logging: + logger.warning('Case is empty: %s', sqlfile.name) + + ressqlfile.unlink(missing_ok=True) + resoutfile.unlink(missing_ok=True) return Path(sqlfile).stem, stmts_count, stmts_run, round(stmts_run * 100 / stmts_count, 2)