summaryrefslogtreecommitdiffstats
path: root/reporting/run_test.sh
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-07-04 17:23:33 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2017-08-09 16:45:43 +0200
commit980523c1c5fa65b4c4a786d6ddb1ddfb70a63bc6 (patch)
tree68072820e868a4688036c2425195966167fdd8fb /reporting/run_test.sh
parent5eb90d88748ee25c0d1a858167d435a9498d175c (diff)
Initiate packetization of Testing reporting
Testing reporting provides - static reporting pages [1] (jinja2) - landing pages including test case catalogue [2] (angular) It consumes the Test API to build web pages providing status for the testing projects (so far functest, yardstick, storperf and qtip). Dockerization has been initiated [3]. The goal is to replace the static page hosted on testresults.opnfv.org by a docker regenerated and redeployed when reporting code is changed But the docker and more generally the testing reporting directory must be refactored to - manage dependencies properly - leverage tox (py27, docs, pylint, pep8) This patch - setups tox (py27, pep8, pylint, docs) - integrate the requirement management - fix pep8 errors - introduce 1 dummy unit test This patch does not - fix pylint errors - create any doc [1]: http://testresults.opnfv.org/reporting2/display/index.html [2]: http://testresults.opnfv.org/reporting2/reporting/index.html [3]: https://gerrit.opnfv.org/gerrit/#/c/36735/ Change-Id: I4613de7ca7036d6c6bbb8f58ade492b1d673599b Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'reporting/run_test.sh')
-rwxr-xr-xreporting/run_test.sh45
1 files changed, 2 insertions, 43 deletions
diff --git a/reporting/run_test.sh b/reporting/run_test.sh
index 8c674ce..b83b550 100755
--- a/reporting/run_test.sh
+++ b/reporting/run_test.sh
@@ -1,44 +1,3 @@
#!/bin/bash
-set -o errexit
-set -o pipefail
-
-
-# Get script directory
-SCRIPTDIR=`dirname $0`
-
-# Creating virtual environment
-if [ ! -z $VIRTUAL_ENV ]; then
- venv=$VIRTUAL_ENV
-else
- venv=$SCRIPTDIR/.venv
- virtualenv $venv
-fi
-
-source $venv/bin/activate
-
-export CONFIG_REPORTING_YAML=$SCRIPTDIR/reporting.yaml
-
-# ***************
-# Run unit tests
-# ***************
-echo "Running unit tests..."
-
-# install python packages
-easy_install -U setuptools
-easy_install -U pip
-pip install -r $SCRIPTDIR/docker/requirements.pip
-pip install -e $SCRIPTDIR
-
-python $SCRIPTDIR/setup.py develop
-
-# unit tests
-# TODO: remove cover-erase
-# To be deleted when all functest packages will be listed
-nosetests --with-xunit \
- --cover-package=$SCRIPTDIR/utils \
- --with-coverage \
- --cover-xml \
- $SCRIPTDIR/tests/unit
-rc=$?
-
-deactivate
+tox
+exit $?