|
@@ -68,13 +68,17 @@ cd \$SCRIPT_PATH
|
|
cd code
|
|
cd code
|
|
# Execute tests
|
|
# Execute tests
|
|
set -e
|
|
set -e
|
|
|
|
+PRINT_COV=true
|
|
testpath="discover -s Test/"
|
|
testpath="discover -s Test/"
|
|
if [ -e "Test/test_\$1.py" ]; then
|
|
if [ -e "Test/test_\$1.py" ]; then
|
|
testpath="Test/test_\$1.py"
|
|
testpath="Test/test_\$1.py"
|
|
|
|
+ PRINT_COV=false
|
|
fi
|
|
fi
|
|
PYTHONWARNINGS="ignore" coverage3 run --source=. -m unittest \$testpath >/dev/null
|
|
PYTHONWARNINGS="ignore" coverage3 run --source=. -m unittest \$testpath >/dev/null
|
|
-coverage3 html
|
|
|
|
-coverage3 report -m
|
|
|
|
|
|
+if \$PRINT_COV ; then
|
|
|
|
+ coverage3 html
|
|
|
|
+ coverage3 report -m
|
|
|
|
+fi
|
|
EOF
|
|
EOF
|
|
|
|
|
|
# Create the test script
|
|
# Create the test script
|