tests/ci: do not compress logs twice

Cc: @alesapin
This commit is contained in:
Azat Khuzhin 2021-12-03 01:28:32 +03:00
parent e895c85f49
commit bfaaa79cfc

View File

@ -49,7 +49,9 @@ class S3Helper():
else:
logging.info("No content type provied for %s", file_path)
else:
if s3_path.endswith("txt") or s3_path.endswith("log") or ".log." in s3_path or s3_path.endswith("err") or s3_path.endswith("out"):
is_log = s3_path.endswith("log") or ".log." in s3_path
is_text = s3_path.endswith("txt") or is_log or s3_path.endswith("err") or s3_path.endswith("out")
if not s3_path.endswith('.gz') and (is_text or is_log):
logging.info("Going to compress file log file %s to %s", file_path, file_path + ".gz")
compress_file_fast(file_path, file_path + ".gz")
file_path += ".gz"