Fix: Release report PDF generation bug 78/7878/2
authorPeter Mikus <pmikus@cisco.com>
Wed, 2 Aug 2017 11:17:35 +0000 (13:17 +0200)
committerPeter Mikus <pmikus@cisco.com>
Wed, 2 Aug 2017 11:32:30 +0000 (13:32 +0200)
QXcbConnection: Could not connect to display

Change-Id: Ie6e99f7dc3a0372768955c28f32c90c542e0be78
Signed-off-by: Peter Mikus <pmikus@cisco.com>
resources/tools/report_gen/run_report.sh

index 597cff0..ec779ad 100755 (executable)
@@ -35,7 +35,7 @@ sudo apt-get -y install libxml2 libxml2-dev libxslt-dev build-essential \
     zlib1g-dev unzip
 if [[ ${CFG[BLD_LATEX]} -eq 1 ]] ;
 then
-    sudo apt-get -y install librsvg2-bin texlive-latex-recommended \
+    sudo apt-get -y install xvfb texlive-latex-recommended \
         texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra latexmk wkhtmltopdf
     sudo sed -i.bak 's/^\(main_memory\s=\s\).*/\110000000/' /usr/share/texlive/texmf-dist/web2c/texmf.cnf
 fi
@@ -605,12 +605,11 @@ if [[ ${CFG[BLD_LATEX]} -eq 1 ]] ;
 then
     # Convert PyPLOT graphs in HTML format to PDF.
     for f in ${DIR[STATIC,VPP]}/*; do
-        wkhtmltopdf ${f} ${f%.html}.pdf
+        xvfb-run -a wkhtmltopdf ${f} ${f%.html}.pdf
     done
     for f in ${DIR[STATIC,DPDK]}/*; do
-        wkhtmltopdf ${f} ${f%.html}.pdf
+        xvfb-run -a wkhtmltopdf ${f} ${f%.html}.pdf
     done
-    #rsvg-convert -z 10 -f pdf -o fdio.pdf fdio.svg
 
     # Generate the LaTeX documentation
     sphinx-build -v -c . -a -b latex -E \
@@ -621,7 +620,6 @@ then
     pdflatex -interaction nonstopmode csit.tex || true
     cp csit.pdf ../${DIR[STATIC,ARCH]}/csit_$1.pdf
     cd ${SCRIPT_DIR}
-    #rm -f fdio.pdf
 fi
 
 # Create archive

©2016 FD.io a Linux Foundation Collaborative Project. All Rights Reserved.
Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered trademark of Linus Torvalds.
Please see our privacy policy and terms of use.