core-admin/run-tests
Marek Marczykowski-Górecki 12bc523b98
Make run-tests script try to find qrexec
Parts of core-admin (specifically some extensions) require qrexec python
module to work, and to be tested. Try to find it in a standard place (as
qubes-builder place it).
2020-11-26 05:13:56 +01:00

26 lines
709 B
Bash
Executable File

#!/bin/sh
CLEANUP_LVM=
if sudo --non-interactive $(dirname "$0")/ci/lvm-manage setup-lvm vg$$/pool; then
export DEFAULT_LVM_POOL=vg$$/pool
CLEANUP_LVM=yes
fi
: "${PYTHON:=python3}"
: "${TESTPYTHONPATH:=test-packages}"
if [ -d ../core-qrexec/qrexec ] && ! $PYTHON -c 'import qrexec' 2>/dev/null; then
PYTHONPATH="${PYTHONPATH}:../core-qrexec"
fi
PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}"
export PYTHONPATH
"${PYTHON}" setup.py egg_info --egg-base "${TESTPYTHONPATH}"
"${PYTHON}" -m coverage run --rcfile=ci/coveragerc -m qubes.tests.run "$@"
retcode=$?
if [ -n "$CLEANUP_LVM" ]; then
sudo --non-interactive $(dirname "$0")/ci/lvm-manage cleanup-lvm "$DEFAULT_LVM_POOL"
fi
exit $retcode