summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests/builds/buildtest.py
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/tests/builds/buildtest.py
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/tests/builds/buildtest.py')
-rw-r--r--bitbake/lib/toaster/tests/builds/buildtest.py9
1 files changed, 9 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",