summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-03-23 09:11:01 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-23 09:11:01 +0000
commit6f511d54df8505f2385cdc91345154f6dd81fab9 (patch)
treec67219f46b0ff36544620405d004b2cbca3d1280 /utils/test/testapi
parent36e87461d4db933a2e90aad5ae3ab2ecbf8a136a (diff)
parent876071cc5fdfee08ad7790c736f8443db6e0b298 (diff)
Merge "make unittest execution more user-friendly"
Diffstat (limited to 'utils/test/testapi')
-rwxr-xr-xutils/test/testapi/run_test.sh14
-rw-r--r--utils/test/testapi/test-requirements.txt5
2 files changed, 9 insertions, 10 deletions
diff --git a/utils/test/testapi/run_test.sh b/utils/test/testapi/run_test.sh
index 4efc7af3b..1e05dd6ba 100755
--- a/utils/test/testapi/run_test.sh
+++ b/utils/test/testapi/run_test.sh
@@ -8,15 +8,17 @@ SCRIPTDIR=`dirname $0`
echo "Running unit tests..."
# Creating virtual environment
-virtualenv $SCRIPTDIR/testapi_venv
-source $SCRIPTDIR/testapi_venv/bin/activate
+if [ ! -z $VIRTUAL_ENV ]; then
+ venv=$VIRTUAL_ENV
+else
+ venv=$SCRIPTDIR/.venv
+ virtualenv $venv
+fi
+source $venv/bin/activate
# Install requirements
pip install -r $SCRIPTDIR/requirements.txt
-pip install coverage
-pip install nose>=1.3.1
-pip install pytest
-pip install mock
+pip install -r $SCRIPTDIR/test-requirements.txt
find . -type f -name "*.pyc" -delete
diff --git a/utils/test/testapi/test-requirements.txt b/utils/test/testapi/test-requirements.txt
index 4633ad637..645687b14 100644
--- a/utils/test/testapi/test-requirements.txt
+++ b/utils/test/testapi/test-requirements.txt
@@ -2,10 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-tox
mock
pytest
-pytest-cov
coverage
-pykwalify
-pip_check_reqs
+nose>=1.3.1