Code Review
/
releng.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Compass4NFV add new scenario nosdn-kvm"
[releng.git]
/
utils
/
test
/
testapi
/
run_test.sh
diff --git
a/utils/test/testapi/run_test.sh
b/utils/test/testapi/run_test.sh
index
d1f05f2
..
1e05dd6
100755
(executable)
--- a/
utils/test/testapi/run_test.sh
+++ b/
utils/test/testapi/run_test.sh
@@
-5,20
+5,20
@@
set -o errexit
# Get script directory
SCRIPTDIR=`dirname $0`
# Get script directory
SCRIPTDIR=`dirname $0`
-# Either Workspace is set (CI)
-if [ -z $WORKSPACE ]
-then
- WORKSPACE="."
-fi
-
echo "Running unit tests..."
# Creating virtual environment
echo "Running unit tests..."
# Creating virtual environment
-virtualenv $WORKSPACE/testapi_venv
-source $WORKSPACE/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
# Install requirements
pip install -r $SCRIPTDIR/requirements.txt
+pip install -r $SCRIPTDIR/test-requirements.txt
find . -type f -name "*.pyc" -delete
find . -type f -name "*.pyc" -delete
@@
-26,7
+26,7
@@
nosetests --with-xunit \
--with-coverage \
--cover-erase \
--cover-package=$SCRIPTDIR/opnfv_testapi/cmd \
--with-coverage \
--cover-erase \
--cover-package=$SCRIPTDIR/opnfv_testapi/cmd \
- --cover-package=$SCRIPTDIR/opnfv_testapi/common
n
\
+ --cover-package=$SCRIPTDIR/opnfv_testapi/common \
--cover-package=$SCRIPTDIR/opnfv_testapi/resources \
--cover-package=$SCRIPTDIR/opnfv_testapi/router \
--cover-xml \
--cover-package=$SCRIPTDIR/opnfv_testapi/resources \
--cover-package=$SCRIPTDIR/opnfv_testapi/router \
--cover-xml \