[oe-commits] [openembedded-core] 09/10: reproducible: Allow configuration of saved debug output
git at git.openembedded.org
git at git.openembedded.org
Sun Feb 2 15:04:14 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit d3f55d6620cdd2a059b8c17c548a7d3e3539a093
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Sun Feb 2 11:01:33 2020 +0000
reproducible: Allow configuration of saved debug output
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/selftest/cases/reproducible.py | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 9d1bcf3..c261076 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'
@@ -79,7 +80,10 @@ def compare_file(reference, test, diffutils_sysroot):
class ReproducibleTests(OESelftestTestCase):
package_classes = ['deb', 'ipk']
images = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline']
- save_results = True
+ 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)
+
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list