chore(ci): open last_log_file in append mode (#2776)

* open last_log_file in append mode
This commit is contained in:
Kostas Kyrimis 2024-03-26 19:01:26 +02:00 committed by GitHub
parent 4025b4a6af
commit 7b7291c001
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,11 +142,13 @@ class DflyInstance:
self.log_files = self.get_logs_from_psutil()
last_log_file = open("/tmp/last_test_log_files.txt", "w")
last_log_file = open("/tmp/last_test_log_files.txt", "a")
for log in self.log_files:
last_log_file.write(log + "\n")
last_log_file.close()
# Remove first 6 lines - our default header with log locations (as it carries no useful information)
# Next, replace log-level + date with port and colored arrow
sed_format = f"1,6d;s/[^ ]*/{self.port}{Colors.next()}{Colors.CLEAR}/"