[v1,1/4] CI: Enable downloads dir sharing

Message ID 20221129114344.19128-2-amikan@ilbers.de
State Superseded, archived
Headers show
Series Add developers test | expand

Commit Message

Anton Mikanovich Nov. 29, 2022, 11:43 a.m. UTC
Test cases performed in different build dir now can share DL_DIR.

Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
 testsuite/cibuilder.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Patch

diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index d5c83b22..a09b738a 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -54,7 +54,8 @@  class CIBuilder(Test):
 
     def configure(self, compat_arch=True, cross=None, debsrc_cache=False,
                   container=False, ccache=False, sstate=False, offline=False,
-                  gpg_pub_key=None, wic_deploy_parts=False, **kwargs):
+                  gpg_pub_key=None, wic_deploy_parts=False, dl_dir=None,
+                  **kwargs):
         # write configuration file and set bitbake_args
         # can run multiple times per test case
         self.check_init()
@@ -64,6 +65,9 @@  class CIBuilder(Test):
         if cross is None:
             cross = bool(int(self.params.get('cross', default=0)))
 
+        if dl_dir is None:
+            dl_dir = os.path.join(isar_root, 'downloads')
+
         # get parameters from environment
         distro_apt_premir = os.getenv('DISTRO_APT_PREMIRRORS')
 
@@ -78,6 +82,7 @@  class CIBuilder(Test):
                       f'  sstate = {sstate}\n'
                       f'  gpg_pub_key = {gpg_pub_key}\n'
                       f'  wic_deploy_parts = {wic_deploy_parts}\n'
+                      f'  dl_dir = {dl_dir}\n'
                       f'===================================================')
 
         # determine bitbake_args
@@ -113,6 +118,8 @@  class CIBuilder(Test):
             if ccache:
                 f.write('USE_CCACHE = "1"\n')
                 f.write('CCACHE_TOP_DIR = "${TOPDIR}/ccache"\n')
+            if dl_dir:
+                f.write('DL_DIR = "%s"\n' % dl_dir)
 
         # include ci_build.conf in local.conf
         with open(self.build_dir + '/conf/local.conf', 'r+') as f: