* [PATCH 0/3] Fix failed repro test impact on other tests
@ 2022-04-08 5:31 Uladzimir Bely
2022-04-08 5:31 ` [PATCH 1/3] ci: cleanup tmp after repro test failed Uladzimir Bely
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Uladzimir Bely @ 2022-04-08 5:31 UTC (permalink / raw)
To: isar-users
When full set of tests is run, repro tests are run first. If there was
an error during repro tests, workdir was not cleaned and this caused
problems with the following tests.
Uladzimir Bely (3):
ci: cleanup tmp after repro test failed
ci: rename tmp in repro tests to access logs
deb-dl-dir: grep exact version when caching source package
meta/classes/deb-dl-dir.bbclass | 2 +-
testsuite/cibase.py | 3 ---
testsuite/cibuilder.py | 4 ++++
testsuite/citest.py | 10 ++++++++--
4 files changed, 13 insertions(+), 6 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] ci: cleanup tmp after repro test failed
2022-04-08 5:31 [PATCH 0/3] Fix failed repro test impact on other tests Uladzimir Bely
@ 2022-04-08 5:31 ` Uladzimir Bely
2022-04-08 5:31 ` [PATCH 2/3] ci: rename tmp in repro tests to access logs Uladzimir Bely
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2022-04-08 5:31 UTC (permalink / raw)
To: isar-users
If repro test fails for some reason, "tmp" directory is left dirty
and may impact on the following tests that build the same targets.
This can cause errors like "Release signed by unknown key" because
custom distro keyring was left from the previous signed repro test.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
testsuite/cibase.py | 3 ---
testsuite/citest.py | 10 ++++++++--
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/testsuite/cibase.py b/testsuite/cibase.py
index 0281be41..4a942ae0 100755
--- a/testsuite/cibase.py
+++ b/testsuite/cibase.py
@@ -45,9 +45,6 @@ class CIBaseTest(CIBuilder):
# Try to build with changed configuration with no cleanup
self.bitbake(targets, **kwargs)
- # Cleanup
- self.delete_from_build_dir('tmp')
-
def perform_ccache_test(self, targets):
build_dir, bb_args = self.prep('Isar ccache build', targets, 0, 0)
diff --git a/testsuite/citest.py b/testsuite/citest.py
index 8f47338c..5d4cd0aa 100755
--- a/testsuite/citest.py
+++ b/testsuite/citest.py
@@ -31,7 +31,10 @@ class ReproTest(CIBaseTest):
]
self.init()
- self.perform_repro_test(targets, signed=True)
+ try:
+ self.perform_repro_test(targets, signed=True)
+ finally:
+ self.delete_from_build_dir('tmp')
def test_repro_unsigned(self):
targets = [
@@ -40,7 +43,10 @@ class ReproTest(CIBaseTest):
]
self.init()
- self.perform_repro_test(targets)
+ try:
+ self.perform_repro_test(targets)
+ finally:
+ self.delete_from_build_dir('tmp')
class CcacheTest(CIBaseTest):
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/3] ci: rename tmp in repro tests to access logs
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
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
3 siblings, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2022-04-08 5:31 UTC (permalink / raw)
To: isar-users
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/3] deb-dl-dir: grep exact version when caching source package
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 ` [PATCH 2/3] ci: rename tmp in repro tests to access logs Uladzimir Bely
@ 2022-04-08 5:31 ` Uladzimir Bely
2022-05-04 7:49 ` [PATCH 0/3] Fix failed repro test impact on other tests Anton Mikanovich
3 siblings, 0 replies; 5+ messages in thread
From: Uladzimir Bely @ 2022-04-08 5:31 UTC (permalink / raw)
To: isar-users
This fixes false-positive detection of package belonging to the current
build. For example, version "1:1.2.11.dfsg-2" of zlib1g package matches
"... status installed zlib1g:amd64 1:1.2.11.dfsg-2+deb11u1" line in
dpkg.log that was left by larger version.
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index f49f1c2a..eace5102 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -12,7 +12,7 @@ is_not_part_of_current_build() {
# Since we are parsing all the debs in DEBDIR, we can to some extend
# try to eliminate some debs that are not part of the current multiconfig
# build using the below method.
- local output="$( grep -hs "status installed ${package}:${arch} ${version}" \
+ local output="$( grep -hs "status installed ${package}:${arch} ${version}$" \
"${IMAGE_ROOTFS}"/var/log/dpkg.log \
"${BUILDCHROOT_HOST_DIR}"/var/log/dpkg.log \
"${BUILDCHROOT_TARGET_DIR}"/var/log/dpkg.log | head -1 )"
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] Fix failed repro test impact on other tests
2022-04-08 5:31 [PATCH 0/3] Fix failed repro test impact on other tests Uladzimir Bely
` (2 preceding siblings ...)
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 ` Anton Mikanovich
3 siblings, 0 replies; 5+ messages in thread
From: Anton Mikanovich @ 2022-05-04 7:49 UTC (permalink / raw)
To: Uladzimir Bely, isar-users
08.04.2022 08:31, Uladzimir Bely wrote:
> When full set of tests is run, repro tests are run first. If there was
> an error during repro tests, workdir was not cleaned and this caused
> problems with the following tests.
>
> Uladzimir Bely (3):
> ci: cleanup tmp after repro test failed
> ci: rename tmp in repro tests to access logs
> deb-dl-dir: grep exact version when caching source package
>
> meta/classes/deb-dl-dir.bbclass | 2 +-
> testsuite/cibase.py | 3 ---
> testsuite/cibuilder.py | 4 ++++
> testsuite/citest.py | 10 ++++++++--
> 4 files changed, 13 insertions(+), 6 deletions(-)
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-04 7:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/3] ci: rename tmp in repro tests to access logs Uladzimir Bely
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox