From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH 2/2] CI: Avoid removing logs from tmp
Date: Tue, 16 Jan 2024 13:52:05 +0200 [thread overview]
Message-ID: <20240116115205.537399-3-amikan@ilbers.de> (raw)
In-Reply-To: <20240116115205.537399-1-amikan@ilbers.de>
All the tasks executed during CI run should left their logs. That's why
we can't just rm 'tmp' folders inside test cases. Move them in other
locations instead.
This will probably increase maximum disk usage but improve debugging.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
testsuite/cibase.py | 16 ++++++++--------
testsuite/citest.py | 4 ++--
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/testsuite/cibase.py b/testsuite/cibase.py
index adeff205..90591f32 100755
--- a/testsuite/cibase.py
+++ b/testsuite/cibase.py
@@ -45,7 +45,7 @@ class CIBaseTest(CIBuilder):
try:
self.bitbake(targets, **kwargs)
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_middle_repro_%s' % ('signed' if signed else 'unsigned'))
self.configure(gpg_pub_key=gpg_pub_key if signed else None, offline=True, sstate_dir="", **kwargs)
self.bitbake(targets, **kwargs)
@@ -80,7 +80,7 @@ class CIBaseTest(CIBuilder):
# Field that stores direct ccache hits
direct_cache_hit = 22
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_before_ccache')
self.delete_from_build_dir('sstate-cache')
self.delete_from_build_dir('ccache')
@@ -89,7 +89,7 @@ class CIBaseTest(CIBuilder):
hit1 = ccache_stats(self.build_dir + '/ccache', direct_cache_hit)
self.log.info('Ccache hits 1: ' + str(hit1))
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_middle_ccache')
self.delete_from_build_dir('sstate-cache')
self.log.info('Starting build and using ccache dir...')
@@ -101,7 +101,7 @@ class CIBaseTest(CIBuilder):
self.fail('Ccache was not used on second build')
# Cleanup
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_after_ccache')
self.delete_from_build_dir('sstate-cache')
self.delete_from_build_dir('ccache')
self.unconfigure()
@@ -117,7 +117,7 @@ class CIBaseTest(CIBuilder):
# Cleanup sstate and tmp before test
self.delete_from_build_dir('sstate-cache')
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_before_sstate_populate')
# Populate cache
self.bitbake(image_target, **kwargs)
@@ -158,7 +158,7 @@ class CIBaseTest(CIBuilder):
expected_files = set(glob.glob(f'{self.build_dir}/tmp/deploy/images/*/*'))
# Rebuild image
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_before_sstate')
self.bitbake(image_target, **kwargs)
if not all([
check_executed_tasks('isar-bootstrap-target',
@@ -182,7 +182,7 @@ class CIBaseTest(CIBuilder):
self.fail("Failed rebuild image")
# Rebuild single package
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_middle_sstate')
self.bitbake(package_target, **kwargs)
if not all([
check_executed_tasks('isar-bootstrap-target',
@@ -195,7 +195,7 @@ class CIBaseTest(CIBuilder):
self.fail("Failed rebuild single package")
# Rebuild package and image
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_middle2_sstate')
process.run(f'find {self.build_dir}/sstate-cache/ -name sstate:hello:* -delete')
self.bitbake(image_target, **kwargs)
if not all([
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 7be2b86b..d7ece76c 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -162,7 +162,7 @@ class WicTest(CIBaseTest):
targets = ['mc:qemuarm64-bookworm:isar-image-ci']
self.init()
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_before_wic')
self.perform_wic_partition_test(targets,
wic_deploy_parts=False, debsrc_cache=True, compat_arch=False)
@@ -210,7 +210,7 @@ class NoCrossTest(CIBaseTest):
self.init()
# Cleanup after cross build
- self.delete_from_build_dir('tmp')
+ self.move_in_build_dir('tmp', 'tmp_before_nocross')
self.perform_build_test(targets, cross=False, debsrc_cache=True)
def test_nocross_rpi(self):
--
2.34.1
next prev parent reply other threads:[~2024-01-16 11:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 11:52 [PATCH 0/2] Improve Isar CI logging Anton Mikanovich
2024-01-16 11:52 ` [PATCH 1/2] sbuild: Schroot config logging Anton Mikanovich
2024-01-16 11:52 ` Anton Mikanovich [this message]
2024-01-23 9:11 ` [PATCH 0/2] Improve Isar CI logging Uladzimir Bely
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=20240116115205.537399-3-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