yocto-autobuilder-helper/scripts/run-toaster-tests
Alexander Lussier-Cullen e1289afb9e scripts/run-toaster-tests.py: Add environment variables
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-11-23 15:23:02 +00:00

29 lines
596 B
Bash
Executable File

#!/bin/bash
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Called with $1 as the build directory
# $2 as the path to poky
set -e
set -u
set -o pipefail
set -x
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
python3 -m pip install tox
tox -c $pokydir/bitbake/lib/toaster/tox.ini