summaryrefslogtreecommitdiffstats
path: root/run_unit_tests.sh
diff options
context:
space:
mode:
authorashishk1994 <ashishk.iiit@gmail.com>2017-04-22 22:10:31 +0530
committerCédric Ollivier <cedric.ollivier@orange.com>2017-05-20 12:16:12 +0200
commitea5efce7b1a3aadcb78b72284740583d40689d6f (patch)
tree545279a527d90ec3c45ff1d36162111a74cf13b7 /run_unit_tests.sh
parent79dbdf18f187b79d8f5b7c6929b16f75b09bebc1 (diff)
Tox utility to run unit tests
Now run_unit_tests.sh only calls tox to allow merging. It can be safely deleted as soon as the related jjob is updated. It also removes test_logging.ini. Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I934f4ac739d99d0cb29bea8c6aac6d6780b30901 Signed-off-by: ashishk1994 <ashishk.iiit@gmail.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'run_unit_tests.sh')
-rwxr-xr-xrun_unit_tests.sh39
1 files changed, 1 insertions, 38 deletions
diff --git a/run_unit_tests.sh b/run_unit_tests.sh
index 3eb2cda8d..31a95f481 100755
--- a/run_unit_tests.sh
+++ b/run_unit_tests.sh
@@ -1,42 +1,5 @@
#!/bin/bash
-set -o errexit
-set -o pipefail
-# Either Workspace is set (CI)
-if [ -z $WORKSPACE ]
-then
- WORKSPACE=`pwd`
-fi
-
-
-# ***************
-# Run unit tests
-# ***************
-echo "Running unit tests..."
-
-sudo apt-get install -y build-essential python-dev python-pip
-sudo pip install virtualenv==15.1.0
-
-# start vitual env
-virtualenv $WORKSPACE/functest_venv
-source $WORKSPACE/functest_venv/bin/activate
-
-# install python packages
-pip install --upgrade pip
-pip install -r $WORKSPACE/requirements.txt
-pip install -r $WORKSPACE/test-requirements.txt
-pip install $WORKSPACE
-
-nosetests --with-xunit \
- --with-coverage \
- --cover-tests \
- --cover-package=functest \
- --cover-xml \
- --cover-html \
- --log-config=$(pwd)/functest/tests/unit/test_logging.ini \
- functest/tests/unit
-rc=$?
-
-deactivate
+tox
exit $rc