Files
c7a9cb918297e5f48604fbb67bdab5b972f7c293
Peter Portante
9094c5cc66
Add branch coverage reporting
Except where the python-nose package version does not support the "--cover-branches" option. Change-Id: I9ea6452d9834b3ac414e14e628002f593dd4b8c8 Signed-off-by: Peter Portante <peter.portante@redhat.com>
15 lines
402 B
Bash
Executable File
15 lines
402 B
Bash
Executable File
#!/bin/bash
python -c 'from distutils.version import LooseVersion as Ver; import nose, sys; sys.exit(0 if Ver(nose.__version__) >= Ver("1.2.0") else 1)'
if [ $? != 0 ]; then
cover_branches=""
else
cover_branches="--cover-branches"
fi
cd $(dirname 0ドル)/test/unit
nosetests --exe --with-coverage --cover-package swift. --cover-erase $cover_branches $@
rvalue=$?
rm -f .coverage
cd -
exit $rvalue