aboutsummaryrefslogtreecommitdiffstats
path: root/run_unit_tests.sh
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-10-17 16:14:50 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2016-10-19 15:20:51 +0200
commit87ddf690c47d38659d9b126bb56aa7de18d22ef8 (patch)
tree327a9d5db7c444014cc16dc7f1a344dc2890d353 /run_unit_tests.sh
parent4e7522b1223582b4c52a7b15df4f275fcf9bc8e7 (diff)
Add unittests dir
JIRA: FUNCTEST-336 Change-Id: Icd958552fafb4e8dc58f9008586bcaf33862ccd4 Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'run_unit_tests.sh')
-rwxr-xr-xrun_unit_tests.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/run_unit_tests.sh b/run_unit_tests.sh
new file mode 100755
index 00000000..a37cd3d9
--- /dev/null
+++ b/run_unit_tests.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -o errexit
+set -o pipefail
+
+echo "Running unit tests..."
+cd .
+
+# start vitual env
+virtualenv ./functest_venv
+source ./functest_venv/bin/activate
+
+# install python packages
+easy_install -U setuptools
+easy_install -U pip
+pip install -r docker/requirements.pip
+pip install -e .
+
+# unit tests
+nosetests --with-xunit \
+ --with-coverage \
+ --cover-package=functest\
+ --cover-xml \
+ unit_tests
+
+deactivate