From 6a9db991e70a89c6cf4d6bd9bb388f33959560ad Mon Sep 17 00:00:00 2001 From: Alexander Lussier-Cullen Date: Thu, 23 Nov 2023 10:12:14 -0500 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/builds/buildtest.py | 9 +++++++++ bitbake/lib/toaster/tox.ini | 3 +++ 2 files changed, 12 insertions(+) (limited to 'bitbake/lib/toaster') 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): 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", 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} passenv = * [testenv] +passenv = + SSTATE_DIR + DL_DIR setenv = DJANGO_SETTINGS_MODULE=toastermain.settings_test TOASTER_BUILDSERVER=1 -- cgit v1.2.3-54-g00ecf