aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2018-08-03 14:38:20 +0200
committerTibor Frank <tifrank@cisco.com>2018-08-07 06:47:08 +0000
commit903cb9f7dd664c5bc87f3295dd600d6cb23bf8ca (patch)
treedee0a522ac412732d1b3bd6d24f5bfca7b445129
parentce53c5e75c0bd417c8fa61d24c854c2e1a758cd7 (diff)
CSIT-1226: Fix bugs in pdf version
Change-Id: I9c7abca28f98a581a8efb390c6ccf4f8937a958b Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rw-r--r--docs/report/csit_framework_documentation/csit_design.rst11
-rw-r--r--docs/report/csit_framework_documentation/index.rst9
-rw-r--r--docs/report/dpdk_performance_tests/index.rst11
-rw-r--r--docs/report/dpdk_performance_tests/overview.rst14
-rw-r--r--docs/report/honeycomb_functional_tests/index.rst9
-rw-r--r--docs/report/index.html.template (renamed from docs/report/index.rst)54
-rw-r--r--docs/report/index.pdf.template14
-rw-r--r--docs/report/introduction/index.rst9
-rw-r--r--docs/report/introduction/physical_testbeds.rst21
-rw-r--r--docs/report/nsh_sfc_functional_tests/index.rst9
-rw-r--r--docs/report/vpp_functional_tests/index.rst9
-rw-r--r--docs/report/vpp_functional_tests/overview.rst28
-rw-r--r--docs/report/vpp_performance_tests/index.rst13
-rw-r--r--docs/report/vpp_performance_tests/overview.rst42
-rw-r--r--resources/tools/presentation/generator_report.py43
15 files changed, 211 insertions, 85 deletions
diff --git a/docs/report/csit_framework_documentation/csit_design.rst b/docs/report/csit_framework_documentation/csit_design.rst
index b0c5d4acce..c18e4ea542 100644
--- a/docs/report/csit_framework_documentation/csit_design.rst
+++ b/docs/report/csit_framework_documentation/csit_design.rst
@@ -24,11 +24,12 @@ including CSIT framework is depicted in the figure below.
.. raw:: latex
- \begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/csit_framework_documentation/csit_design_picture}
- \label{fig:csit_design_picture}
- \end{figure}
+ \begin{figure}[H]
+ \centering
+ \graphicspath{{../_tmp/src/csit_framework_documentation/}}
+ \includegraphics[width=0.90\textwidth]{csit_design_picture}
+ \label{fig:csit_design_picture}
+ \end{figure}
.. only:: html
diff --git a/docs/report/csit_framework_documentation/index.rst b/docs/report/csit_framework_documentation/index.rst
new file mode 100644
index 0000000000..0b3228dc51
--- /dev/null
+++ b/docs/report/csit_framework_documentation/index.rst
@@ -0,0 +1,9 @@
+CSIT Framework Documentation
+============================
+
+.. toctree::
+
+ csit_design
+ csit_test_naming
+ pal_lld
+ csit_tag_description
diff --git a/docs/report/dpdk_performance_tests/index.rst b/docs/report/dpdk_performance_tests/index.rst
new file mode 100644
index 0000000000..3aa32435f0
--- /dev/null
+++ b/docs/report/dpdk_performance_tests/index.rst
@@ -0,0 +1,11 @@
+DPDK Performance
+================
+
+.. toctree::
+
+ overview
+ csit_release_notes
+ packet_throughput_graphs/index
+ packet_latency_graphs/index
+ test_environment
+ documentation
diff --git a/docs/report/dpdk_performance_tests/overview.rst b/docs/report/dpdk_performance_tests/overview.rst
index 81f5ed5efc..41881b8c8e 100644
--- a/docs/report/dpdk_performance_tests/overview.rst
+++ b/docs/report/dpdk_performance_tests/overview.rst
@@ -28,9 +28,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-nic2nic}
- \label{fig:logical-2n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-nic2nic}
+ \label{fig:logical-2n-nic2nic}
\end{figure}
.. only:: html
@@ -45,9 +46,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-nic2nic}
- \label{fig:logical-3n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-nic2nic}
+ \label{fig:logical-3n-nic2nic}
\end{figure}
.. only:: html
diff --git a/docs/report/honeycomb_functional_tests/index.rst b/docs/report/honeycomb_functional_tests/index.rst
new file mode 100644
index 0000000000..ba0b8a0c19
--- /dev/null
+++ b/docs/report/honeycomb_functional_tests/index.rst
@@ -0,0 +1,9 @@
+HoneyComb Functional
+====================
+
+.. toctree::
+
+ overview
+ csit_release_notes
+ test_environment
+ documentation
diff --git a/docs/report/index.rst b/docs/report/index.html.template
index 40602c114b..b5b55c0dd2 100644
--- a/docs/report/index.rst
+++ b/docs/report/index.html.template
@@ -61,34 +61,32 @@ CSIT 18.07
nsh_sfc_functional_tests/test_environment
nsh_sfc_functional_tests/documentation
-.. only:: html
-
- .. toctree::
- :maxdepth: 2
- :caption: Detailed Results
-
- detailed_test_results/vpp_performance_results/index
- detailed_test_results/vpp_mrr_results/index
- detailed_test_results/cot_performance_results/index
- detailed_test_results/dpdk_performance_results/index
- detailed_test_results/vpp_functional_results/index
- detailed_test_results/honeycomb_functional_results/index
- detailed_test_results/nshsfc_functional_results/index
-
- .. toctree::
- :maxdepth: 2
- :caption: Test Configuration
-
- test_configuration/vpp_performance_configuration/index
- test_configuration/vpp_mrr_configuration/index
- test_configuration/cot_performance_configuration/index
- test_configuration/vpp_functional_configuration/index
-
- .. toctree::
- :maxdepth: 2
- :caption: Test Operational Data
-
- test_operational_data/vpp_performance_operational_data/index
+.. toctree::
+ :maxdepth: 2
+ :caption: Detailed Results
+
+ detailed_test_results/vpp_performance_results/index
+ detailed_test_results/vpp_mrr_results/index
+ detailed_test_results/cot_performance_results/index
+ detailed_test_results/dpdk_performance_results/index
+ detailed_test_results/vpp_functional_results/index
+ detailed_test_results/honeycomb_functional_results/index
+ detailed_test_results/nshsfc_functional_results/index
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Test Configuration
+
+ test_configuration/vpp_performance_configuration/index
+ test_configuration/vpp_mrr_configuration/index
+ test_configuration/cot_performance_configuration/index
+ test_configuration/vpp_functional_configuration/index
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Test Operational Data
+
+ test_operational_data/vpp_performance_operational_data/index
.. toctree::
:maxdepth: 2
diff --git a/docs/report/index.pdf.template b/docs/report/index.pdf.template
new file mode 100644
index 0000000000..54d9c7dfbe
--- /dev/null
+++ b/docs/report/index.pdf.template
@@ -0,0 +1,14 @@
+CSIT 18.07
+==========
+
+.. toctree::
+ :numbered:
+
+ introduction/index
+ vpp_performance_tests/index
+ dpdk_performance_tests/index
+ vpp_functional_tests/index
+ honeycomb_functional_tests/index
+ nsh_sfc_functional_tests/index
+ csit_framework_documentation/index
+ indices
diff --git a/docs/report/introduction/index.rst b/docs/report/introduction/index.rst
new file mode 100644
index 0000000000..7d4f4c0d77
--- /dev/null
+++ b/docs/report/introduction/index.rst
@@ -0,0 +1,9 @@
+Introduction
+============
+
+.. toctree::
+
+ overview
+ general_notes
+ physical_testbeds
+ methodology
diff --git a/docs/report/introduction/physical_testbeds.rst b/docs/report/introduction/physical_testbeds.rst
index c2cdd3e77a..454a751cf3 100644
--- a/docs/report/introduction/physical_testbeds.rst
+++ b/docs/report/introduction/physical_testbeds.rst
@@ -42,9 +42,10 @@ Physical testbed topology is depicted in a figure below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/introduction/testbed-3n-hsw}
- \label{fig:testbed-3n-hsw}
+ \centering
+ \graphicspath{{../_tmp/src/introduction/}}
+ \includegraphics[width=0.90\textwidth]{testbed-3n-hsw}
+ \label{fig:testbed-3n-hsw}
\end{figure}
.. only:: html
@@ -94,9 +95,10 @@ processors. Physical testbed topology is depicted in a figure below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/introduction/testbed-3n-skx}
- \label{fig:testbed-3n-skx}
+ \centering
+ \graphicspath{{../_tmp/src/introduction/}}
+ \includegraphics[width=0.90\textwidth]{testbed-3n-skx}
+ \label{fig:testbed-3n-skx}
\end{figure}
.. only:: html
@@ -146,9 +148,10 @@ processors. Physical testbed topology is depicted in a figure below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/introduction/testbed-2n-skx}
- \label{fig:testbed-2n-skx}
+ \centering
+ \graphicspath{{../_tmp/src/introduction/}}
+ \includegraphics[width=0.90\textwidth]{testbed-2n-skx}
+ \label{fig:testbed-2n-skx}
\end{figure}
.. only:: html
diff --git a/docs/report/nsh_sfc_functional_tests/index.rst b/docs/report/nsh_sfc_functional_tests/index.rst
new file mode 100644
index 0000000000..5e467170ed
--- /dev/null
+++ b/docs/report/nsh_sfc_functional_tests/index.rst
@@ -0,0 +1,9 @@
+NSH_SFC Functional
+==================
+
+.. toctree::
+
+ overview
+ csit_release_notes
+ test_environment
+ documentation
diff --git a/docs/report/vpp_functional_tests/index.rst b/docs/report/vpp_functional_tests/index.rst
new file mode 100644
index 0000000000..5c236e4fbd
--- /dev/null
+++ b/docs/report/vpp_functional_tests/index.rst
@@ -0,0 +1,9 @@
+VPP Functional
+==============
+
+.. toctree::
+
+ overview
+ csit_release_notes
+ test_environment
+ documentation
diff --git a/docs/report/vpp_functional_tests/overview.rst b/docs/report/vpp_functional_tests/overview.rst
index 80c9131387..035696dc77 100644
--- a/docs/report/vpp_functional_tests/overview.rst
+++ b/docs/report/vpp_functional_tests/overview.rst
@@ -25,9 +25,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-nic2nic}
- \label{fig:logical-2n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-nic2nic}
+ \label{fig:logical-2n-nic2nic}
\end{figure}
.. only:: html
@@ -42,9 +43,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-nic2nic}
- \label{fig:logical-3n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-nic2nic}
+ \label{fig:logical-3n-nic2nic}
\end{figure}
.. only:: html
@@ -80,9 +82,10 @@ only. DUT (VPP) test topology with VM is shown in the figure below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-vm-vhost}
- \label{fig:logical-2n-vm-vhost}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-vm-vhost}
+ \label{fig:logical-2n-vm-vhost}
\end{figure}
.. only:: html
@@ -97,9 +100,10 @@ only. DUT (VPP) test topology with VM is shown in the figure below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-vm-vhost}
- \label{fig:logical-3n-vm-vhost}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-vm-vhost}
+ \label{fig:logical-3n-vm-vhost}
\end{figure}
.. only:: html
diff --git a/docs/report/vpp_performance_tests/index.rst b/docs/report/vpp_performance_tests/index.rst
new file mode 100644
index 0000000000..abef2c8667
--- /dev/null
+++ b/docs/report/vpp_performance_tests/index.rst
@@ -0,0 +1,13 @@
+VPP Performance
+===============
+
+.. toctree::
+
+ overview
+ csit_release_notes
+ packet_throughput_graphs/index
+ throughput_speedup_multi_core/index
+ packet_latency_graphs/index
+ http_server_performance/index
+ test_environment
+ documentation/index
diff --git a/docs/report/vpp_performance_tests/overview.rst b/docs/report/vpp_performance_tests/overview.rst
index bd0681dc40..7eb8235b8f 100644
--- a/docs/report/vpp_performance_tests/overview.rst
+++ b/docs/report/vpp_performance_tests/overview.rst
@@ -30,9 +30,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-nic2nic}
- \label{fig:logical-2n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-nic2nic}
+ \label{fig:logical-2n-nic2nic}
\end{figure}
.. only:: html
@@ -47,9 +48,10 @@ testbeds are shown in figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-nic2nic}
- \label{fig:logical-3n-nic2nic}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-nic2nic}
+ \label{fig:logical-3n-nic2nic}
\end{figure}
.. only:: html
@@ -107,9 +109,10 @@ SUT running N of VM instances is shown in the figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-vm-vhost}
- \label{fig:logical-2n-vm-vhost}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-vm-vhost}
+ \label{fig:logical-2n-vm-vhost}
\end{figure}
.. only:: html
@@ -124,9 +127,10 @@ SUT running N of VM instances is shown in the figures below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-vm-vhost}
- \label{fig:logical-3n-vm-vhost}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-vm-vhost}
+ \label{fig:logical-3n-vm-vhost}
\end{figure}
.. only:: html
@@ -187,9 +191,10 @@ below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-2n-container-memif}
- \label{fig:logical-2n-container-memif}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-2n-container-memif}
+ \label{fig:logical-2n-container-memif}
\end{figure}
.. only:: html
@@ -204,9 +209,10 @@ below.
.. raw:: latex
\begin{figure}[H]
- \centering
- \includesvg[width=0.90\textwidth]{../_tmp/src/vpp_performance_tests/logical-3n-container-memif}
- \label{fig:logical-3n-container-memif}
+ \centering
+ \graphicspath{{../_tmp/src/vpp_performance_tests/}}
+ \includegraphics[width=0.90\textwidth]{logical-3n-container-memif}
+ \label{fig:logical-3n-container-memif}
\end{figure}
.. only:: html
diff --git a/resources/tools/presentation/generator_report.py b/resources/tools/presentation/generator_report.py
index 287d0782b0..dd200fa622 100644
--- a/resources/tools/presentation/generator_report.py
+++ b/resources/tools/presentation/generator_report.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2017 Cisco and/or its affiliates.
+# Copyright (c) 2018 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -148,11 +148,17 @@ def generate_html_report(release, spec, versions, report_version):
logging.info(" Generating the html report, give me a few minutes, please "
"...")
+ working_dir = spec.environment["paths"]["DIR[WORKING,SRC]"]
+
+ cmd = 'cd {working_dir} && mv -f index.html.template index.rst'.\
+ format(working_dir=working_dir)
+ execute_command(cmd)
+
cmd = HTML_BUILDER.format(
release=release,
report_version=report_version,
date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
- working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
+ working_dir=working_dir,
build_dir=spec.environment["paths"]["DIR[BUILD,HTML]"])
execute_command(cmd)
@@ -183,16 +189,23 @@ def generate_pdf_report(release, spec, versions, report_version):
logging.info(" Generating the pdf report, give me a few minutes, please "
"...")
- convert_plots = "xvfb-run -a wkhtmltopdf {html} {pdf}.pdf"
+ working_dir = spec.environment["paths"]["DIR[WORKING,SRC]"]
+
+ cmd = 'cd {working_dir} && mv -f index.pdf.template index.rst'.\
+ format(working_dir=working_dir)
+ execute_command(cmd)
+
+ _convert_all_svg_to_pdf(spec.environment["paths"]["DIR[WORKING,SRC]"])
# Convert PyPLOT graphs in HTML format to PDF.
+ convert_plots = "xvfb-run -a wkhtmltopdf {html} {pdf}"
plots = get_files(spec.environment["paths"]["DIR[STATIC,VPP]"], "html")
plots.extend(get_files(spec.environment["paths"]["DIR[STATIC,DPDK]"],
"html"))
for plot in plots:
- file_name = "{0}".format(plot.rsplit(".", 1)[0])
- cmd = convert_plots.format(html=plot, pdf=file_name)
- execute_command(cmd)
+ file_name = "{0}.pdf".format(plot.rsplit(".", 1)[0])
+ logging.info("Converting '{0}' to '{1}'".format(plot, file_name))
+ execute_command(convert_plots.format(html=plot, pdf=file_name))
# Generate the LaTeX documentation
build_dir = spec.environment["paths"]["DIR[BUILD,LATEX]"]
@@ -200,7 +213,7 @@ def generate_pdf_report(release, spec, versions, report_version):
release=release,
report_version=report_version,
date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
- working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
+ working_dir=working_dir,
build_dir=build_dir)
execute_command(cmd)
@@ -242,3 +255,19 @@ def archive_report(spec):
base_dir=spec.environment["paths"]["DIR[BUILD,HTML]"])
logging.info(" Done.")
+
+
+def _convert_all_svg_to_pdf(path):
+ """Convert all svg files on path "path" to pdf.
+
+ :param path: Path to the root directory with svg files to convert.
+ :type path: str
+ """
+
+ cmd = "inkscape -D -z --file={svg} --export-pdf={pdf} --export-latex"
+
+ svg_files = get_files(path, "svg", full_path=True)
+ for svg_file in svg_files:
+ pdf_file = "{0}.pdf".format(svg_file.rsplit('.', 1)[0])
+ logging.info("Converting '{0}' to '{1}'".format(svg_file, pdf_file))
+ execute_command(cmd.format(svg=svg_file, pdf=pdf_file))