2016-04-19 15:57:08 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-09-04 22:33:21 +02:00
|
|
|
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
|
|
|
|
|
2017-03-16 20:36:41 +01:00
|
|
|
: "${PYTHON:=python3}"
|
2016-04-19 15:57:08 +02:00
|
|
|
: "${TESTPYTHONPATH:=test-packages}"
|
|
|
|
|
|
|
|
PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}"
|
|
|
|
export PYTHONPATH
|
|
|
|
|
|
|
|
"${PYTHON}" setup.py egg_info --egg-base "${TESTPYTHONPATH}"
|
2017-03-16 20:35:56 +01:00
|
|
|
"${PYTHON}" -m coverage run --rcfile=ci/coveragerc -m qubes.tests.run "$@"
|
2016-09-04 22:33:21 +02:00
|
|
|
retcode=$?
|
|
|
|
if [ -n "$CLEANUP_LVM" ]; then
|
|
|
|
sudo --non-interactive $(dirname "$0")/ci/lvm-manage cleanup-lvm "$DEFAULT_LVM_POOL"
|
|
|
|
fi
|
|
|
|
exit $retcode
|