Skip to content
Snippets Groups Projects
Commit a90b0925 authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

SW-652: made python-coverage.sh python3 compliant.

parent cd61a015
No related branches found
No related tags found
No related merge requests found
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
COVERAGE_EXCLUDE_LINES="[report]\nexclude_lines = \n if __name__ == .__main__.\n def main\n" COVERAGE_EXCLUDE_LINES="[report]\nexclude_lines = \n if __name__ == .__main__.\n def main\n"
# Determine python-coverage executable # Determine python-coverage executable
if type "coverage" >& /dev/null; then if type "coverage3" >& /dev/null; then
COVERAGE=coverage COVERAGE=coverage3
elif type "python-coverage" >& /dev/null; then elif type "python3-coverage" >& /dev/null; then
COVERAGE=python-coverage COVERAGE=python3-coverage
else else
COVERAGE="" COVERAGE=""
fi fi
...@@ -43,9 +43,9 @@ function python_coverage_test { ...@@ -43,9 +43,9 @@ function python_coverage_test {
exit $RESULT exit $RESULT
else else
#python-coverage not available #python-coverage not available
echo "Please run: 'pip install python-coverage' to enable code coverage reporting of the unit tests" echo "Please run: 'pip3 install coverage' to enable code coverage reporting of the unit tests"
#run plain test script #run plain test script
python "$@" python3 "$@"
fi fi
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment