run-tests 577 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. CLEANUP_LVM=
  3. if sudo --non-interactive $(dirname "$0")/ci/lvm-manage setup-lvm vg$$/pool; then
  4. export DEFAULT_LVM_POOL=vg$$/pool
  5. CLEANUP_LVM=yes
  6. fi
  7. : "${PYTHON:=python3}"
  8. : "${TESTPYTHONPATH:=test-packages}"
  9. PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}"
  10. export PYTHONPATH
  11. "${PYTHON}" setup.py egg_info --egg-base "${TESTPYTHONPATH}"
  12. "${PYTHON}" -m coverage run --rcfile=ci/coveragerc -m qubes.tests.run "$@"
  13. retcode=$?
  14. if [ -n "$CLEANUP_LVM" ]; then
  15. sudo --non-interactive $(dirname "$0")/ci/lvm-manage cleanup-lvm "$DEFAULT_LVM_POOL"
  16. fi
  17. exit $retcode