Add nose and coverage requirements in unittest script 11/27411/5
authorrohitsakala <rohitsakala@gmail.com>
Mon, 23 Jan 2017 20:07:54 +0000 (01:37 +0530)
committerrohitsakala <rohitsakala@gmail.com>
Tue, 24 Jan 2017 21:22:15 +0000 (02:52 +0530)
bugfix to :-
https://build.opnfv.org/ci/job/testapi-verify-master/22/console

Change-Id: I0eaa730aed68ce11b9095c2810c223a0519ffcde
Signed-off-by: rohitsakala <rohitsakala@gmail.com>
jjb/releng/testapi-automate.yml
utils/test/testapi/run_test.sh

index 25ee687..084790e 100644 (file)
@@ -55,8 +55,8 @@
         - cobertura:
             report-file: "coverage.xml"
             only-stable: "true"
-            health-auto-update: "true"
-            stability-auto-update: "true"
+            health-auto-update: "false"
+            stability-auto-update: "false"
             zoom-coverage-chart: "true"
             targets:
                 - files:
index d1f05f2..51db09f 100755 (executable)
@@ -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 \