swift/.unittests
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>
2013-06-10 10:30:40 -04:00

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