cabot/bin/test_with_coverage

16 lines
389 B
Bash
Executable File

#!/bin/bash
set -x
output_dir='test-results'
mkdir -p $output_dir
./manage.py collectstatic --no-input
TEMPLATE_DEBUG=True coverage run --source="./cabot/" manage.py test $@
status=$?
coverage report --omit="cabot/cabotapp/tests*"
coverage xml --omit="cabot/cabotapp/tests*" -o $output_dir/coverage.xml
coverage html --omit="cabot/cabotapp/tests*" -d $output_dir/htmlcov/
exit $status