diff options
author | rohitsakala <rohitsakala@gmail.com> | 2017-01-24 01:37:54 +0530 |
---|---|---|
committer | rohitsakala <rohitsakala@gmail.com> | 2017-01-25 02:52:15 +0530 |
commit | 59accdc890d1a764921f46a68233806a7cedb989 (patch) | |
tree | 7e63ef4e7875f734a97f02d9a91e2203b886cdce | |
parent | 493e9b40697320bd48dbc4350f77e6e0370e5e08 (diff) |
Add nose and coverage requirements in unittest script
bugfix to :-
https://build.opnfv.org/ci/job/testapi-verify-master/22/console
Change-Id: I0eaa730aed68ce11b9095c2810c223a0519ffcde
Signed-off-by: rohitsakala <rohitsakala@gmail.com>
-rwxr-xr-x | testapi/run_test.sh | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/testapi/run_test.sh b/testapi/run_test.sh index d1f05f2..51db09f 100755 --- a/testapi/run_test.sh +++ b/testapi/run_test.sh @@ -5,20 +5,16 @@ set -o errexit # Get script directory SCRIPTDIR=`dirname $0` -# Either Workspace is set (CI) -if [ -z $WORKSPACE ] -then - WORKSPACE="." -fi - echo "Running unit tests..." # Creating virtual environment -virtualenv $WORKSPACE/testapi_venv -source $WORKSPACE/testapi_venv/bin/activate +virtualenv $SCRIPTDIR/testapi_venv +source $SCRIPTDIR/testapi_venv/bin/activate # Install requirements pip install -r $SCRIPTDIR/requirements.txt +pip install coverage +pip install nose>=1.3.1 find . -type f -name "*.pyc" -delete @@ -26,7 +22,7 @@ nosetests --with-xunit \ --with-coverage \ --cover-erase \ --cover-package=$SCRIPTDIR/opnfv_testapi/cmd \ - --cover-package=$SCRIPTDIR/opnfv_testapi/commonn \ + --cover-package=$SCRIPTDIR/opnfv_testapi/common \ --cover-package=$SCRIPTDIR/opnfv_testapi/resources \ --cover-package=$SCRIPTDIR/opnfv_testapi/router \ --cover-xml \ |