* [PATCH] reproducible: Allow configuration of saved debug output
@ 2020-02-02 16:52 Richard Purdie
2020-02-02 17:02 ` ✗ patchtest: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2020-02-02 16:52 UTC (permalink / raw)
To: openembedded-core
If OEQA_DEBUGGING_SAVED_OUTPUT is set in the environment, use this location
to store reproducibile build failure output. This aids debugging on the
YP autobuilder in particular.
Use a date in the directory name to make it easier to find failure output.
Also clean up empty directories as they're unnecessary distracting noise.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/reproducible.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 9c715ef8ebd..c2610766664 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -15,6 +15,7 @@ import tempfile
import shutil
import stat
import os
+import datetime
MISSING = 'MISSING'
DIFFERENT = 'DIFFERENT'
@@ -80,6 +81,9 @@ class ReproducibleTests(OESelftestTestCase):
package_classes = ['deb', 'ipk']
images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline']
save_results = False
+ if 'OEQA_DEBUGGING_SAVED_OUTPUT' in os.environ:
+ save_results = os.environ['OEQA_DEBUGGING_SAVED_OUTPUT']
+
# This variable controls if one of the test builds is allowed to pull from
# an sstate cache/mirror. The other build is always done clean as a point of
# comparison.
@@ -168,7 +172,9 @@ class ReproducibleTests(OESelftestTestCase):
diffutils_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffutils-native")
if self.save_results:
- save_dir = tempfile.mkdtemp(prefix='oe-reproducible-')
+ os.makedirs(self.save_results, exist_ok=True)
+ datestr = datetime.datetime.now().strftime('%Y%m%d')
+ save_dir = tempfile.mkdtemp(prefix='oe-reproducible-%s-' % datestr, dir=self.save_results)
os.chmod(save_dir, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH)
self.logger.info('Non-reproducible packages will be copied to %s', save_dir)
@@ -204,3 +210,8 @@ class ReproducibleTests(OESelftestTestCase):
self.fail("The following %s packages are missing or different: %s" %
(c, ' '.join(r.test for r in (result.missing + result.different))))
+ # Clean up empty directories
+ if self.save_results:
+ if not os.listdir(save_dir):
+ os.rmdir(save_dir)
+
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* ✗ patchtest: failure for reproducible: Allow configuration of saved debug output
2020-02-02 16:52 [PATCH] reproducible: Allow configuration of saved debug output Richard Purdie
@ 2020-02-02 17:02 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2020-02-02 17:02 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
== Series Details ==
Series: reproducible: Allow configuration of saved debug output
Revision: 1
URL : https://patchwork.openembedded.org/series/22387/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue Series does not apply on top of target branch [test_series_merge_on_head]
Suggested fix Rebase your series on top of targeted branch
Targeted branch master (currently at 138ed4aa96)
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-02 17:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-02 16:52 [PATCH] reproducible: Allow configuration of saved debug output Richard Purdie
2020-02-02 17:02 ` ✗ patchtest: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox