diff mbox series

[yocto-autobuilder-helper] scripts/run-toaster-tests.py: Add environment variables

Message ID 20231123150703.4342-1-alexander.lussier-cullen@savoirfairelinux.com
State New
Headers show
Series [yocto-autobuilder-helper] scripts/run-toaster-tests.py: Add environment variables | expand

Commit Message

Alexander Lussier-Cullen Nov. 23, 2023, 3:07 p.m. UTC
Pass the toaster test environment SSTATE_DIR and DL_DIR for faster
builds and TOASTER_DJANGO_TMPDIR to remove problematic temp files
from the root level '/tmp' directory.

Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
---
 scripts/run-toaster-tests | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/scripts/run-toaster-tests b/scripts/run-toaster-tests
index a785c36..516965e 100755
--- a/scripts/run-toaster-tests
+++ b/scripts/run-toaster-tests
@@ -14,6 +14,12 @@  builddir=$(realpath "$1")
 pokydir=$(realpath "$2")
 
 cd $builddir
+
+bitbake -e > bbenv
+export SSTATE_DIR=$(grep '^SSTATE_DIR=' bbenv | cut -d "=" -f2-)
+export DL_DIR=$(grep '^DL_DIR=' bbenv | cut -d "=" -f2-)
+export TOASTER_DJANGO_TMPDIR=$builddir
+
 mkdir -p toaster_logs
 python3 -m venv venv --without-pip --system-site-packages
 source venv/bin/activate