From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 6/6] CI: Change QEMU boot logs format
Date: Tue, 22 Feb 2022 10:12:59 +0300 [thread overview]
Message-ID: <20220222071259.157349-7-amikan@ilbers.de> (raw)
In-Reply-To: <20220222071259.157349-1-amikan@ilbers.de>
Move startvm boot logs into separate location with log datetime and
'latest' log symlinks.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
testsuite/cibuilder.py | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 52bb2a5..069a1d9 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -199,10 +199,18 @@ class CIBuilder(Test):
self.check_init()
- fd, output_file = tempfile.mkstemp(suffix='_log.txt',
- prefix='vm_start_' + distro + '_' +
- arch + '_', dir=self.build_dir, text=True)
+ logdir = '%s/vm_start' % self.build_dir
+ if not os.path.exists(logdir):
+ os.mkdir(logdir)
+ prefix = '%s-vm_start_%s_%s_' % (time.strftime('%Y%m%d-%H%M%S'),
+ distro, arch)
+ fd, output_file = tempfile.mkstemp(suffix='_log.txt', prefix=prefix,
+ dir=logdir, text=True)
os.chmod(output_file, 0o644)
+ latest_link = '%s/vm_start_%s_%s_latest.txt' % (logdir, distro, arch)
+ if os.path.exists(latest_link):
+ os.unlink(latest_link)
+ os.symlink(os.path.basename(output_file), latest_link)
cmdline = start_vm.format_qemu_cmdline(arch, self.build_dir, distro,
output_file, None)
--
2.25.1
prev parent reply other threads:[~2022-02-22 7:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-22 7:12 [PATCH 0/6] Unify build and run test cases Anton Mikanovich
2022-02-22 7:12 ` [PATCH 1/6] CI: Reorganize testsuite folders Anton Mikanovich
2022-02-22 7:12 ` [PATCH 2/6] CI: Migrate all tests to one location Anton Mikanovich
2022-02-22 7:12 ` [PATCH 3/6] CI: Adopt vm_start test logging Anton Mikanovich
2022-02-22 7:12 ` [PATCH 4/6] CI: Do not run QEMU start tests from Gitlab Anton Mikanovich
2022-02-22 7:12 ` [PATCH 5/6] CI: Rename build_test.py to citest.py Anton Mikanovich
2022-02-22 7:12 ` Anton Mikanovich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220222071259.157349-7-amikan@ilbers.de \
--to=amikan@ilbers.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox