mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00

Strip quotes from directory variables as they caused path errors. Add environment variable for the toaster artifact directory. Migrate from tox and django tools to using pytest. Install python module requirements from the script as this is no longer handled by tox. Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> CC: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
31 lines
849 B
Bash
Executable File
31 lines
849 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- | sed -e 's/^"//' -e 's/"$//')
|
|
export DL_DIR=$(grep '^DL_DIR=' bbenv | cut -d "=" -f2- | sed -e 's/^"//' -e 's/"$//')
|
|
export TOASTER_DJANGO_TMPDIR=$builddir
|
|
export TOASTER_DIR=$builddir
|
|
|
|
mkdir -p toaster_logs
|
|
|
|
python3 -m venv venv --without-pip --system-site-packages
|
|
source venv/bin/activate
|
|
python3 -m pip install -r $pokydir/bitbake/toaster-requirements.txt -r $pokydir/bitbake/lib/toaster/tests/toaster-tests-requirements.txt
|
|
|
|
python3 -m pytest -c $pokydir/bitbake/lib/toaster/pytest.ini $pokydir/bitbake/lib/toaster/tests/
|