X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=run_unit_tests.sh;h=86096fabffa08007770945d6c2adca3c763592bf;hb=5442c9738c27d0c516040410f3f651fab4b7e70a;hp=606aedcd5ae58f0386046de02f4e1a8d70c7e41a;hpb=de489169452cd732dc90dc7eded0ff1ee5f68e52;p=functest.git diff --git a/run_unit_tests.sh b/run_unit_tests.sh index 606aedcd5..86096fabf 100755 --- a/run_unit_tests.sh +++ b/run_unit_tests.sh @@ -5,7 +5,7 @@ set -o pipefail # Either Workspace is set (CI) if [ -z $WORKSPACE ] then - WORKSPACE="." + WORKSPACE=`pwd` fi @@ -14,29 +14,30 @@ fi # *************** echo "Running unit tests..." +sudo apt-get install -y build-essential python-dev python-pip +sudo pip install virtualenv==15.1.0 + # start vitual env virtualenv $WORKSPACE/functest_venv source $WORKSPACE/functest_venv/bin/activate # install python packages -sudo apt-get install -y build-essential python-dev python-pip pip install --upgrade pip +pip install -r $WORKSPACE/requirements.txt pip install -r $WORKSPACE/test-requirements.txt pip install $WORKSPACE +#install releng +rm -rf releng-unittests +git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng releng-unittests +pip install releng-unittests/modules/ +rm -fr releng-unittests + export CONFIG_FUNCTEST_YAML=$(pwd)/functest/ci/config_functest.yaml -# unit tests -# TODO: remove cover-erase -# To be deleted when all functest packages will be listed 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-package=functest.opnfv_tests.openstack.rally \ + --cover-package=functest \ --cover-xml \ --cover-html \ --log-config=$(pwd)/functest/tests/unit/test_logging.ini \