Newer
Older
Lluis Gifre Renom
committed
#!/bin/bash
Carlos Natalino Da Silva
committed
PROJECTDIR=`pwd`
Lluis Gifre Renom
committed
cd $(dirname $0)/src
Carlos Natalino Da Silva
committed
RCFILE=$PROJECTDIR/coverage/.coveragerc
Carlos Natalino Da Silva
committed
COVERAGEFILE=$PROJECTDIR/coverage/.coverage
# configure the correct folder on the .coveragerc file
Carlos Natalino Da Silva
committed
cat $PROJECTDIR/coverage/.coveragerc.template | sed s+~/teraflow/controller+$PROJECTDIR+g > $RCFILE
Lluis Gifre Renom
committed
# Run unitary tests and analyze coverage of code at same time
# First destroy old coverage file
rm -f $COVERAGEFILE
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
common/message_broker/tests/test_unitary.py \
common/rpc_method_wrapper/tests/test_unitary.py
Lluis Gifre Renom
committed
Carlos Natalino Da Silva
committed
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
Carlos Natalino Da Silva
committed
centralizedattackdetector/tests/test_unitary.py
Carlos Natalino Da Silva
committed
Lluis Gifre Renom
committed
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
context/tests/test_unitary.py
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
device/tests/test_unitary_driverapi.py \
device/tests/test_unitary_service.py
Lluis Gifre Renom
committed
coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \
l3_centralizedattackdetector/tests/test_unitary.py
coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \
l3_distributedattackdetector/tests/test_unitary.py
coverage run --rcfile=$RCFILE --append -m pytest -s --log-level=INFO --verbose \
l3_attackmitigator/tests/test_unitary.py
Lluis Gifre Renom
committed
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
service/tests/test_unitary.py
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
compute/tests/test_unitary.py