X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=run_unit_tests.sh;h=79d05d3d17f6a8556f2e9823cf70ef2798561eee;hb=79edc2be6cd1be4c6add2be55178369adffb065a;hp=ecd57d8aeb09d1e9cf2e25c3dd6ad84c536b2009;hpb=dafed654965a05cab6891b53df80f11e37a1750a;p=functest.git diff --git a/run_unit_tests.sh b/run_unit_tests.sh index ecd57d8ae..79d05d3d1 100755 --- a/run_unit_tests.sh +++ b/run_unit_tests.sh @@ -2,28 +2,6 @@ set -o errexit set -o pipefail -# ****************************** -# prepare the env for the tests -# ****************************** -# clean useless results dir -# should be done at the end -# but in case of crash during unit test -# clean it anyway -if [ -d "/home/opnfv/functest/results" ] -then - sudo rm -rf /home/opnfv/functest -fi - -# TODO clean that... -# Create log dir if needed -# log shall be disabled during unit tests -# fix to be done in Logger -echo "Create dummy log file...." -sudo mkdir -p /home/opnfv/functest/results/odl -sudo touch /home/opnfv/functest/results/functest.log -sudo touch /home/opnfv/functest/results/odl/stdout.txt -sudo chmod -Rf a+rw /home/opnfv - # Either Workspace is set (CI) if [ -z $WORKSPACE ] then @@ -53,8 +31,11 @@ export CONFIG_FUNCTEST_YAML=$(pwd)/functest/ci/config_functest.yaml nosetests --with-xunit \ --with-coverage \ --cover-erase \ + --cover-tests \ + --cover-package=functest.cli \ --cover-package=functest.core.testcase_base \ --cover-package=functest.opnfv_tests.sdn.odl.odl \ + --cover-package=functest.utils \ --cover-xml \ --cover-html \ functest/tests/unit @@ -62,13 +43,4 @@ rc=$? deactivate -# ******* -# clean -# ******* -# Clean useless logs -if [ -d "/home/opnfv/functest/results" ] -then - sudo rm -rf /home/opnfv/functest/results -fi - exit $rc