diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-11-22 11:05:21 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-11-22 11:05:21 +0000 |
commit | 9d3211605b43daab86e30b2773c02209e5dd2d2d (patch) | |
tree | 4d3545d1482c62f3a9da3c1ac3cd2320b439e6e7 /run_unit_tests.sh | |
parent | fdf8cd017eb17a1cf9eaeff7018cbb69e838b891 (diff) | |
parent | 23fa2fcb5517fafafe6e5263088ceddbb51c3d55 (diff) |
Merge "Add Exceptions and Constants in opnfv module"
Diffstat (limited to 'run_unit_tests.sh')
-rwxr-xr-x | run_unit_tests.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/run_unit_tests.sh b/run_unit_tests.sh new file mode 100755 index 0000000..df511ce --- /dev/null +++ b/run_unit_tests.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set -o errexit +set -o pipefail + +# Either Workspace is set (CI) +if [ -z $WORKSPACE ] +then + WORKSPACE="." +fi + + +# *************** +# Run unit tests +# *************** +echo "Running unit tests..." + +# start vitual env +virtualenv $WORKSPACE/modules_venv +source $WORKSPACE/modules_venv/bin/activate + +# install python packages +easy_install -U setuptools +easy_install -U pip +pip install $WORKSPACE + + +# unit tests +nosetests --with-xunit \ + --cover-package=opnfv \ + --with-coverage \ + --cover-xml \ + --cover-html \ + tests/unit +rc=$? + +deactivate |