From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v3 6/7] CI: Change QEMU boot logs format
Date: Wed, 16 Mar 2022 10:16:46 +0300 [thread overview]
Message-ID: <20220316071647.8919-7-amikan@ilbers.de> (raw)
In-Reply-To: <20220316071647.8919-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.17.1
next prev parent reply other threads:[~2022-03-16 7:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 7:16 [PATCH v3 0/7] Unify build and run test cases Anton Mikanovich
2022-03-16 7:16 ` [PATCH v3 1/7] CI: Reorganize testsuite folders Anton Mikanovich
2022-03-16 7:16 ` [PATCH v3 2/7] CI: Migrate all tests to one location Anton Mikanovich
2022-03-16 7:16 ` [PATCH v3 3/7] CI: Adopt vm_start test logging Anton Mikanovich
2022-03-16 7:16 ` [PATCH v3 4/7] CI: Do not run QEMU start tests from Gitlab Anton Mikanovich
2022-03-16 7:16 ` [PATCH v3 5/7] CI: Rename build_test.py to citest.py Anton Mikanovich
2022-03-16 7:16 ` Anton Mikanovich [this message]
2022-03-16 7:16 ` [PATCH v3 7/7] CI: Add timeout setting to ci_build Anton Mikanovich
2022-03-23 7:00 ` [PATCH v3 0/7] Unify build and run test cases Anton Mikanovich
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=20220316071647.8919-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