1.2 KiB
Executable File
#!/bin/bash
SPDX-License-Identifier: GPL-2.0-only
Called with $1 as the build directory
$2 as the path to bitbake
set -e set -u set -o pipefail set -x
builddir=$(realpath "$1") bitbakedir=$(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 BB_HASHSERVE=$(grep '^BB_HASHSERVE=' bbenv | cut -d "=" -f2- | sed -e 's/^"//' -e 's/"$//') export TOASTER_DJANGO_TMPDIR=$builddir export TOASTER_DIR=$builddir export TOASTER_TEST_USE_SSTATE_MIRROR=True export BUILDDIR=$builddir/
mkdir -p toaster_logs
python3 -m venv venv --without-pip --system-site-packages source venv/bin/activate python3 -m pip install -r $bitbakedir/toaster-requirements.txt -r $bitbakedir/lib/toaster/tests/toaster-tests-requirements.txt
python3 -m pytest -c $bitbakedir/lib/toaster/pytest.ini $bitbakedir/lib/toaster/tests/
if [ -e $bitbakedir/lib/toaster/orm/fixtures/check_fixtures.py ]; then echo "Checking toaster fixtures" cd $bitbakedir/lib/toaster/orm/fixtures/ $bitbakedir/lib/toaster/orm/fixtures/check_fixtures.py fi