diff --git a/.coveragerc b/.coveragerc index 7db2340d26..0748006235 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,3 +3,8 @@ exclude_lines = pragma: no cover def __repr__ def __str__ + raise NotImplementedError +[run] +omit = external/* +[html] +title = SCION unit test coverage diff --git a/.gitignore b/.gitignore index 6309fc95ab..5bcb5e8bb4 100644 --- a/.gitignore +++ b/.gitignore @@ -26,11 +26,10 @@ Thumbs.db # SCION generated files # ######################### -logs/* -topology/ISD* -topology/SIM -topology/conf-gen -traces/* +/logs/ +/topology/ISD*/ +/topology/SIM/ +/traces/ # Python generated files # @@ -45,19 +44,19 @@ __pycache__ # Crypto library generated files # ######################### -lib/crypto/python-tweetnacl-20140309/build/ +/lib/crypto/python-tweetnacl-20140309/build/ # Documentation and Environment files ######################### -sphinx-doc/_build/ -venv/ +/sphinx-doc/_build/ +/venv/ # Docker working directory ########################## -docker/_build/ +/docker/_build/ # Test coverage ########################## -.coverage -htmlcov/ +/.coverage +/htmlcov/ diff --git a/scion.sh b/scion.sh index 551a10d6fd..8d20c97a9a 100755 --- a/scion.sh +++ b/scion.sh @@ -42,13 +42,13 @@ cmd_status() { } cmd_test(){ - PYTHONPATH=. nosetests -w test "$@" + PYTHONPATH=. nosetests "$@" } cmd_coverage(){ set -e - PYTHONPATH=. nosetests --with-cov -w test "$@" - coverage html --omit 'external/*' + PYTHONPATH=. nosetests --with-cov --cov-report html "$@" + coverage report echo "Coverage report here: file://$PWD/htmlcov/index.html" }