Add run-tests script

Since we use endpoints, those are needed for running tests. Provide
wrapper script.

QubesOS/qubes-issues#853
This commit is contained in:
Marek Marczykowski-Górecki 2017-03-01 15:29:20 +01:00
parent 5f81b9b809
commit f41b51385b
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 12 additions and 1 deletions

View File

@ -10,7 +10,7 @@ install:
- git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder - git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder
script: script:
- test -z "$TESTS_ONLY" || pylint --rcfile=ci/pylintrc qubesmgmt - test -z "$TESTS_ONLY" || pylint --rcfile=ci/pylintrc qubesmgmt
- test -z "$TESTS_ONLY" || python -m unittest discover -p '*.py' -v - test -z "$TESTS_ONLY" || ./run-tests
- test -n "$TESTS_ONLY" || ~/qubes-builder/scripts/travis-build - test -n "$TESTS_ONLY" || ~/qubes-builder/scripts/travis-build
env: env:
- TESTS_ONLY=1 - TESTS_ONLY=1

10
run-tests Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
: "${PYTHON:=python}"
: "${TESTPYTHONPATH:=test-packages}"
PYTHONPATH="${TESTPYTHONPATH}:${PYTHONPATH}"
export PYTHONPATH
"${PYTHON}" setup.py egg_info --egg-base "${TESTPYTHONPATH}"
"${PYTHON}" -m unittest discover -p '*.py' -v "$@"

1
test-packages/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
qubesmgmt.egg-info