public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH 2/3] ci: rename tmp in repro tests to access logs
Date: Fri,  8 Apr 2022 07:31:09 +0200	[thread overview]
Message-ID: <20220408053110.10416-3-ubely@ilbers.de> (raw)
In-Reply-To: <20220408053110.10416-1-ubely@ilbers.de>

When repro tests are finished, "tmp" directory is removed and later
is populated by other tests.

It makes repro tests hard to debug in case of errors. So, instead of
removing, we just move the directory for further analysis.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 testsuite/cibuilder.py | 4 ++++
 testsuite/citest.py    | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 44d31aa2..ef68d97f 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -124,6 +124,10 @@ class CIBuilder(Test):
         self.check_init()
         process.run('rm -rf ' + self.build_dir + '/' + path, sudo=True)
 
+    def move_in_build_dir(self, src, dst):
+        self.check_init()
+        process.run('mv ' + self.build_dir + '/' + src + ' ' + self.build_dir + '/' + dst, sudo=True)
+
     def bitbake(self, target, bitbake_cmd=None, **kwargs):
         self.check_init()
         self.log.info('===================================================')
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 5d4cd0aa..d0ad728f 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -34,7 +34,7 @@ class ReproTest(CIBaseTest):
         try:
             self.perform_repro_test(targets, signed=True)
         finally:
-            self.delete_from_build_dir('tmp')
+            self.move_in_build_dir('tmp', 'tmp_repro_signed')
 
     def test_repro_unsigned(self):
         targets = [
@@ -46,7 +46,7 @@ class ReproTest(CIBaseTest):
         try:
             self.perform_repro_test(targets)
         finally:
-            self.delete_from_build_dir('tmp')
+            self.move_in_build_dir('tmp', 'tmp_repro_unsigned')
 
 class CcacheTest(CIBaseTest):
 
-- 
2.20.1


  parent reply	other threads:[~2022-04-08  5:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-08  5:31 [PATCH 0/3] Fix failed repro test impact on other tests Uladzimir Bely
2022-04-08  5:31 ` [PATCH 1/3] ci: cleanup tmp after repro test failed Uladzimir Bely
2022-04-08  5:31 ` Uladzimir Bely [this message]
2022-04-08  5:31 ` [PATCH 3/3] deb-dl-dir: grep exact version when caching source package Uladzimir Bely
2022-05-04  7:49 ` [PATCH 0/3] Fix failed repro test impact on other tests 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=20220408053110.10416-3-ubely@ilbers.de \
    --to=ubely@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