How can I generate an aggregate HTML/PDF/DOC report from multiple projects in Polyspace Access?
15 views (last 30 days)
Show older comments
MathWorks Support Team
on 19 Nov 2021
Edited: MathWorks Support Team
on 22 Nov 2021
How can I generate an aggregate HTML/PDF/DOC report from multiple projects in Polyspace Access?
Accepted Answer
MathWorks Support Team
on 22 Nov 2021
Edited: MathWorks Support Team
on 22 Nov 2021
Polyspace can generate HTML/PDF/DOC reports your analysis results, including the review data users may have provided on Polyspace Access. If your software is split into parts which are analyzed in separate analysis runs and each of them is stored in Polyspace Access, you can create one single report which contains all the results as follows:
1.) Use the Access user interface or polyspace-access -list-project to find out the run IDs in of the projects which shall be contained in the report
2.)
the identified run IDs from Access. Each download results in one data folder.
3.)Run polyspace-report-generator with
Example script for Linux which creates aggregate reports from the latest runs within a project path in Polyspace Access
1.) Create the following script make-aggregate-report.sh:
#!/bin/bash
set -e
INSTALLPATH=/usr/local/Polyspace_Server/R2021b
TEMPLATE=$INSTALLPATH/toolbox/polyspace/psrptgen/templates/Developer.rpt
ACCESS=$INSTALLPATH/polyspace/bin/polyspace-access
ARGS="-protocol https -host access.mycompany.com -port 9443 -login jenkins -encrypted-password ABABABABABAB"
function joinby { local IFS="$1"; shift; echo "$*"; }
echo "### Getting subprojects for path '$1' ..."
SUBP=$($ACCESS $ARGS -list-project | grep "$1" | sed -nE 's/.*RUN_ID ([0-9]+)/\1/p')
echo "Run IDs: $SUBP"
echo "### Downloading subprojects ..."
FOLDERS=()
for RUNID in $SUBP; do
echo "Downloading run '$RUNID' ..."
$ACCESS $ARGS -download $RUNID -output-folder-path $RUNID
FOLDERS+=($RUNID)
done
FOLDERLIST=$(joinby , "${FOLDERS[@]}")
echo "### Creating aggregate report from $FOLDERLIST ..."
polyspace-report-generator -template $TEMPLATE -format PDF -results-dir $FOLDERLIST -output-name aggregate-report
2.) Adapt the variables INSTALLPATH, TEMPLATE and ARGS according to your installation parameters.
3.) Use the script as follows: ./make-aggregate-report.sh <project-path>, whereas <project-path> can be obtained by right-clicking the desired folder in the
Project Explorer
of Polyspace Access and click
Copy Project Path To Clipboard
0 Comments
More Answers (0)
See Also
Categories
Find more on Generate Reports in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!