How can I generate a Polyspace Bug Finder or Code Prover report which includes SQO thresholds from command line?

조회 수: 6 (최근 30일)
I have automated the Polyspace verification but now need to set a Sooftware Quality Objective before generating a report. 
How can I do that from command line and how do I see PASS or FAIL in the document report? 

채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 10월 14일 0:00
편집: MathWorks Support Team 2025년 10월 14일 9:43

Until R2018b

You can do this as follows:
set MATLAB=C:\Program Files\MATLAB\R2018a "%MATLAB%\polyspace\bin\polyspace-results-repository.exe" -download -f -prog Code_Prover_Example -verif-version 1.1 -product "Code Prover" Results_SQO "%MATLAB%\polyspace\bin\polyspace-report-generator.exe" -results-dir Results_SQO -template "%MATLAB%\toolbox\polyspace\psrptgen\templates\metrics\SoftwareQualityObjectives_Summary.rpt" -format PDF
The first command
polyspace-results-repository
(after the set) is downloading the results 1.1 from the project Code_Prover_Example into the results folder
Results_SQO
.
The next command polyspace-report-generator is launching the report generation using the template SoftwareQualityObjectives_Summary.rpt in PDF format for the results in the results folder Results_SQO.
The SQO level will be the one set in Polyspace Metrics.

Since R2019a

To begin, you need to upload your Polyspace Bug Finder and Polyspace Code Prover results to the Polyspace Access repository.
Next, for the project, you must explicitly define a Software Quality Objective (SQO) level. This can be done either through the web interface or via the command line using:
polyspace-access -set-sqo
Refer to the documentation for more details: SQO Documentation
Once the SQO level is assigned to the project, you can generate a report using one of the two SQO-specific templates:
  • SoftwareQualityObjectives.rpt
  • SoftwareQualityObjectives_Summary.rpt
For example, on a Windows system, you can define the template path and select the desired template as follows:
SET templatepath="C:\Program Files\Polyspace\R2025a\toolbox\polyspace\psrptgen\templates\sqo\"
SET reporttemplate=%template_path%\SoftwareQualityObjectives.rpt
Then, generate the report using the polyspace-report-generator command. Replace the placeholders with your actual values (see PolyspaceReportGenerator documentation):
polyspace-report-generator -host myAccessServer -credentials-file myCredentials.txt ^
-template %report_template% ^
-format PDF -run-id 16 ^
-output-name myReport.pdf
The resulting myReport.pdf will indicate whether the project PASSes or FAILs based on the SQO level defined in Polyspace Access for the project associated with run ID 16.

추가 답변 (0개)

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

아직 릴리스를 입력하지 않았습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by