core-agent-linux/run-tests
Marek Marczykowski-Górecki 07be216a0d
tests: add run-tests script, plug it into travis
Also, replace subproces.call with a mockup, as notify-send is not
available on travis.
2017-05-20 13:20:08 +02:00

14 lines
387 B
Bash
Executable File

#!/bin/sh
: "${PYTHON:=python3}"
: "${ROOTDIR:=.}"
: "${TESTPYTHONPATH:=$ROOTDIR/test-packages}"
PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}"
export PYTHONPATH
[ -r version ] || ln -s ${ROOTDIR}/version ./
[ -r setup.py ] || ln -s ${ROOTDIR}/setup.py ./
"${PYTHON}" ./setup.py egg_info --egg-base "${TESTPYTHONPATH}"
"${PYTHON}" -m coverage run -m unittest discover -p '*.py' -v "$@"