summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--utils/test/reporting/docker/Dockerfile6
-rwxr-xr-xutils/test/reporting/docker/reporting.sh11
-rw-r--r--utils/test/reporting/docker/requirements.pip1
-rw-r--r--utils/test/reporting/yardstick/reporting-status.py7
4 files changed, 13 insertions, 12 deletions
diff --git a/utils/test/reporting/docker/Dockerfile b/utils/test/reporting/docker/Dockerfile
index 789df9115..b5fe09894 100644
--- a/utils/test/reporting/docker/Dockerfile
+++ b/utils/test/reporting/docker/Dockerfile
@@ -29,15 +29,15 @@ ENV CONFIG_REPORTING_YAML /home/opnfv/utils/test/reporting/reporting.yaml
# Packaged dependencies
RUN apt-get update && apt-get install -y \
ssh \
+python-pip \
git-core \
wkhtmltopdf \
--no-install-recommends
RUN pip install --upgrade pip
-RUN pip install -r ${working_dir}/docker/requirements.txt
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng /home/opnfv
+RUN pip install -r ${working_dir}/docker/requirements.pip
WORKDIR ${working_dir}
-CMD ["bash", "./docker/reporting.sh"]
-CMD ["bash", "mv display /usr/share/nginx/html"]
+RUN docker/reporting.sh
diff --git a/utils/test/reporting/docker/reporting.sh b/utils/test/reporting/docker/reporting.sh
index 5d4ea11f4..d6b173ceb 100755
--- a/utils/test/reporting/docker/reporting.sh
+++ b/utils/test/reporting/docker/reporting.sh
@@ -1,5 +1,4 @@
#!/bin/bash
-cd ..
export PYTHONPATH="${PYTHONPATH}:."
export CONFIG_REPORTING_YAML=./reporting.yaml
@@ -20,7 +19,7 @@ do
done
# copy images, js, css, 3rd_party
-cp -Rf 3rd_party display
+cp -Rf 3rd_party display
cp -Rf css display
cp -Rf html/* display
cp -Rf img display
@@ -34,7 +33,7 @@ cp -Rf js display
if [ -z "$1" ]; then
echo "********************************"
- echo " Functest reporting "
+ echo " Functest reporting "
echo "********************************"
echo "reporting vIMS..."
python ./functest/reporting-vims.py
@@ -49,7 +48,7 @@ if [ -z "$1" ]; then
echo "Functest reporting status...OK"
echo "********************************"
- echo " Yardstick reporting "
+ echo " Yardstick reporting "
echo "********************************"
python ./yardstick/reporting-status.py
echo "Yardstick reporting status...OK"
@@ -58,8 +57,8 @@ else
reporting_type="status"
fi
echo "********************************"
- echo " $project/$reporting_type reporting "
+ echo " $project/$reporting_type reporting "
echo "********************************"
python ./$project/reporting-$reporting_type.py
fi
-
+mv display /usr/share/nginx/html
diff --git a/utils/test/reporting/docker/requirements.pip b/utils/test/reporting/docker/requirements.pip
index 21d5ba97a..c1bf4b109 100644
--- a/utils/test/reporting/docker/requirements.pip
+++ b/utils/test/reporting/docker/requirements.pip
@@ -10,3 +10,4 @@
pdfkit==0.5.0
PyYAML==3.11
simplejson==3.8.1
+jinja2==2.8
diff --git a/utils/test/reporting/yardstick/reporting-status.py b/utils/test/reporting/yardstick/reporting-status.py
index 338154987..a0f0b0184 100644
--- a/utils/test/reporting/yardstick/reporting-status.py
+++ b/utils/test/reporting/yardstick/reporting-status.py
@@ -53,15 +53,16 @@ for version in versions:
# From each scenarios get results list
for s, s_result in scenario_results.items():
logger.info("---------------------------------")
- logger.info("installer %s, version %s, " +
- "scenario %s:" % (installer, version, s))
+ logger.info("installer %s, version %s, scenario %s", installer,
+ version, s)
ten_criteria = len(s_result)
ten_score = 0
for v in s_result:
ten_score += v
- LASTEST_TESTS = rp_utils.get_config('general.nb_iteration_tests_success_criteria')
+ LASTEST_TESTS = rp_utils.get_config(
+ 'general.nb_iteration_tests_success_criteria')
four_result = s_result[:LASTEST_TESTS]
four_criteria = len(four_result)
four_score = 0