Commit 70de2102 authored by Carlos Natalino's avatar Carlos Natalino
Browse files

Modifying the test and coverage execution files to accomodate the case where...

Modifying the test and coverage execution files to accomodate the case where the project is located in any folder.
parent 3cf0b0b1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ htmlcov/
.tox/
.nox/
.coverage
.coveragerc.final
.coverage.*
.cache
nosetests.xml
+3 −1
Original line number Diff line number Diff line
#!/bin/bash

PROJECTDIR=`pwd`

cd $(dirname $0)/src
RCFILE=~/teraflow/controller/coverage/.coveragerc
RCFILE=$PROJECTDIR/controller/coverage/.coveragerc

echo
echo "Coverage report:"
+9 −2
Original line number Diff line number Diff line
#!/bin/bash

PROJECTDIR=`pwd`

cd $(dirname $0)/src
RCFILE=~/teraflow/controller/coverage/.coveragerc
COVERAGEFILE=~/teraflow/controller/coverage/.coverage
RCFILE=$PROJECTDIR/coverage/.coveragerc.final
COVERAGEFILE=$PROJECTDIR/coverage/.coverage

# configure the correct folder on the .coveragerc file
cat $PROJECTDIR/coverage/.coveragerc | sed s+~/teraflow/controller+$PROJECTDIR+g > $RCFILE

# Run unitary tests and analyze coverage of code at same time

@@ -33,3 +38,5 @@ export REDIS_DATABASE_ID='0'
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \
    common/database/tests/test_engine_redis.py \
    tester_integration/test_context_device_service.py

rm $RCFILE