]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/reproducible: Fix unset save_dir variable
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jan 2020 10:44:24 +0000 (10:44 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 22 Jan 2020 15:55:59 +0000 (15:55 +0000)
Previous refactoring broke the case where save_dir was set. Fix this.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/reproducible.py

index c00b92d2e9053c259305638e3e4f6bb0383d2924..9c715ef8ebd053b0f6d9245f10c7ca0e80754e3c 100644 (file)
@@ -137,11 +137,6 @@ class ReproducibleTests(OESelftestTestCase):
     def do_test_build(self, name, use_sstate):
         capture_vars = ['DEPLOY_DIR_' + c.upper() for c in self.package_classes]
 
-        if self.save_results:
-            save_dir = tempfile.mkdtemp(prefix='oe-reproducible-')
-            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)
-
         tmpdir = os.path.join(self.topdir, name, 'tmp')
         if os.path.exists(tmpdir):
             bb.utils.remove(tmpdir, recurse=True)
@@ -172,6 +167,11 @@ class ReproducibleTests(OESelftestTestCase):
         bitbake("diffutils-native -c addto_recipe_sysroot")
         diffutils_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffutils-native")
 
+        if self.save_results:
+            save_dir = tempfile.mkdtemp(prefix='oe-reproducible-')
+            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)
+
         vars_A = self.do_test_build('reproducibleA', self.build_from_sstate)
         vars_B = self.do_test_build('reproducibleB', False)