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>
This commit is contained in:
Alexander Lussier-Cullen
2023-11-23 10:12:14 -05:00
committed by Richard Purdie
parent 1872cc9d50
commit 6a9db991e7
2 changed files with 12 additions and 0 deletions

View File

@@ -116,6 +116,15 @@ class BuildTest(unittest.TestCase):
project = Project.objects.create_project(name=BuildTest.PROJECT_NAME,
release=release)
passthrough_variable_names = ["SSTATE_DIR", "DL_DIR"]
for variable_name in passthrough_variable_names:
current_variable = os.environ.get(variable_name)
if current_variable:
ProjectVariable.objects.get_or_create(
name=variable_name,
value=current_variable,
project=project)
if os.environ.get("TOASTER_TEST_USE_SSTATE_MIRROR"):
ProjectVariable.objects.get_or_create(
name="SSTATE_MIRRORS",

View File

@@ -5,6 +5,9 @@ toxworkdir = {env:TOX_WORKDIR:.tox}
passenv = *
[testenv]
passenv =
SSTATE_DIR
DL_DIR
setenv =
DJANGO_SETTINGS_MODULE=toastermain.settings_test
TOASTER_BUILDSERVER=1