From a8fa3d99da046a10c38693ffbf0bbfa19159445a Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Tue, 29 Aug 2023 16:50:32 +0000 Subject: [PATCH] metrics: Generate PNGs alongside the PDF report This PR generates the PNGs for the kata metrics PDF report. Signed-off-by: Gabriela Cervantes (cherry picked from commit 878d1a2e7dab4a912aa5f99c830d09cfa5bca8ce) --- .../report/report_dockerfile/genreport.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/metrics/report/report_dockerfile/genreport.sh diff --git a/tests/metrics/report/report_dockerfile/genreport.sh b/tests/metrics/report/report_dockerfile/genreport.sh new file mode 100644 index 0000000000..5689c93d0f --- /dev/null +++ b/tests/metrics/report/report_dockerfile/genreport.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright (c) 2018-2023 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 + +REPORTNAME="metrics_report.pdf" + +cd scripts + +Rscript --slave -e "library(knitr);knit('pdf.Rmd')" +Rscript --slave -e "library(knitr);pandoc('pdf.md', format='latex')" + +Rscript --slave -e "library(knitr);knit('html.Rmd')" +Rscript --slave -e "library(knitr);pandoc('html.md', format='html')" + +cp /scripts/pdf.pdf /outputdir/${REPORTNAME} +cp /scripts/figure/*.png /outputdir/ +echo "PNGs of graphs and tables can be found in the output directory." +echo "The report, named ${REPORTNAME}, can be found in the output directory"