summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster
diff options
context:
space:
mode:
authorAlexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>2023-11-23 10:12:14 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-23 15:25:01 +0000
commit6a9db991e70a89c6cf4d6bd9bb388f33959560ad (patch)
treec4c690c43baa9a304809649aa56ea88acd2e6637 /bitbake/lib/toaster
parent1872cc9d5054ebf926c982e90debf4a9e1fbb5fd (diff)
downloadpoky-6a9db991e70a89c6cf4d6bd9bb388f33959560ad.tar.gz
bitbake: toaster/tests: add passthroughs for relevant build environment variables
Toaster build tests create new build environments which do not utlize any existing build environment variables. In particular, DL_DIR and SSTATE_DIR from an existing environment can be passed in to allow for faster builds. Adding these as passthroughs specifically resolves slow builds related to the autobuilder integrations of the toaster test suite. (Bitbake rev: 58cc3a4671878a425f52f9ec21636e366356bfc2) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster')
-rw-r--r--bitbake/lib/toaster/tests/builds/buildtest.py9
-rw-r--r--bitbake/lib/toaster/tox.ini3
2 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/builds/buildtest.py b/bitbake/lib/toaster/tests/builds/buildtest.py
index 13b51fb0d8..53cd7a9ffa 100644
--- a/bitbake/lib/toaster/tests/builds/buildtest.py
+++ b/bitbake/lib/toaster/tests/builds/buildtest.py
@@ -116,6 +116,15 @@ class BuildTest(unittest.TestCase):
116 project = Project.objects.create_project(name=BuildTest.PROJECT_NAME, 116 project = Project.objects.create_project(name=BuildTest.PROJECT_NAME,
117 release=release) 117 release=release)
118 118
119 passthrough_variable_names = ["SSTATE_DIR", "DL_DIR"]
120 for variable_name in passthrough_variable_names:
121 current_variable = os.environ.get(variable_name)
122 if current_variable:
123 ProjectVariable.objects.get_or_create(
124 name=variable_name,
125 value=current_variable,
126 project=project)
127
119 if os.environ.get("TOASTER_TEST_USE_SSTATE_MIRROR"): 128 if os.environ.get("TOASTER_TEST_USE_SSTATE_MIRROR"):
120 ProjectVariable.objects.get_or_create( 129 ProjectVariable.objects.get_or_create(
121 name="SSTATE_MIRRORS", 130 name="SSTATE_MIRRORS",
diff --git a/bitbake/lib/toaster/tox.ini b/bitbake/lib/toaster/tox.ini
index d058558b05..9928657106 100644
--- a/bitbake/lib/toaster/tox.ini
+++ b/bitbake/lib/toaster/tox.ini
@@ -5,6 +5,9 @@ toxworkdir = {env:TOX_WORKDIR:.tox}
5passenv = * 5passenv = *
6 6
7[testenv] 7[testenv]
8passenv =
9 SSTATE_DIR
10 DL_DIR
8setenv = 11setenv =
9 DJANGO_SETTINGS_MODULE=toastermain.settings_test 12 DJANGO_SETTINGS_MODULE=toastermain.settings_test
10 TOASTER_BUILDSERVER=1 13 TOASTER_BUILDSERVER=1