summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-01-25 11:17:32 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-25 11:17:32 +0000
commit32408dd6f7506a2a791bd5c00bf7cd9509961a07 (patch)
tree3543236dac876922cdfa945282f82d79d99e14b7
parent6b16114388d9b8d82b841156e0e31c83ac3ab59f (diff)
parent5671d25ecb2db4e41aa016298799b635bb390192 (diff)
Merge "Add nose and coverage requirements in unittest script"
-rw-r--r--jjb/releng/testapi-automate.yml4
-rwxr-xr-xutils/test/testapi/run_test.sh14
2 files changed, 7 insertions, 11 deletions
diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml
index abb3481ed..78e80b392 100644
--- a/jjb/releng/testapi-automate.yml
+++ b/jjb/releng/testapi-automate.yml
@@ -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:
diff --git a/utils/test/testapi/run_test.sh b/utils/test/testapi/run_test.sh
index d1f05f201..51db09f65 100755
--- a/utils/test/testapi/run_test.sh
+++ b/utils/test/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 \