diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-11-17 15:43:03 +0100 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2016-11-21 17:31:34 +0100 |
commit | 23fa2fcb5517fafafe6e5263088ceddbb51c3d55 (patch) | |
tree | 44ccdb9ff64a5e23f31521d12cb5a8bb53661c5d /run_unit_tests.sh | |
parent | 9de1ded9cf18dfce75d1a85c54242c74e3133fcd (diff) |
Add Exceptions and Constants in opnfv module
JIRA: FUNCTEST-497
Change-Id: I4bc0d545058c4778b632911bb317789110de29d1
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
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 |