How do I use Polyspace Bug Finder with Jenkins?

65 views (last 30 days)
I would like to use Polyspace Bug Finder in a continuous integration system mechanism.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 3 Nov 2023
Edited: MathWorks Support Team on 15 Nov 2023
R2018b and earlier
In the zip package attached to this article you will find information to easily create a Polyspace Bug Finder demo with Jenkins.
The demo workflow is the following:
  • polyspace-configure monitors the compilation of the complete project (a build “all”) and creates an options (a text file listing the options to be used by Polyspace during the analysis).
  • Then Polyspace Bug Finder analysis starts on the built files.
  • Polyspace import comments, at end of the analysis, executes a difference between previous job results and current job results.
  • A Perl script parses the two last log files and the difference between the two last runs to check defects and coding rules.
  • At last, an e-mail will be sent with the difference.
  • From e-mail sent, you can open last results, and you see defects and coding rule violations
Even if it is not the real workflow that you want to apply, it will provide some ideas on how to implement it.
To get more information, see the Docs sub-folder in the zip file that contains a Quick Reference Guide.
R2019a onwards
The 'MathWorks Polyspace plugin' in Jenkins allows you to run the Polyspace Server products as part of continuous integration.
After you install the Polyspace Server (and Polyspace Access) products, you can download the plugin from Jenkins and point the plugin to your product installation. The plugin provides these features:
  • Running Polyspace Bug Finder Server or Polyspace Code Prover Server on checked-in C/C++ code
  • Uploading Polyspace results (bugs, run-time errors, coding standard violations, code complexity metrics and other findings) to the Polyspace Access web interface for review
  • Setting up pass/fail criteria for builds based on Polyspace results
  • Filtering results based on predefined criteria such as file ownership or impact of defects
  • Sending e-mail notifications with new findings to file owners
For an overview of the plugin, see MathWorks Polyspace plugin .
For a quick start and example scripts, see MathWorks Polyspace plugin repository in Github .
For a more detailed tutorial, see the Polyspace documentation .

More Answers (1)

Anirban
Anirban on 27 Mar 2019
In R2019a, the 'MathWorks Polyspace plugin' in Jenkins allows you to run the Polyspace Server products as part of continuous integration.
After you install the Polyspace Server (and Polyspace Access) products, you can download the plugin from Jenkins and point the plugin to your product installation. The plugin provides these features:
  • Running Polyspace Bug Finder Server or Polyspace Code Prover Server on checked-in C/C++ code
  • Uploading Polyspace results (bugs, run-time errors, coding standard violations, code complexity metrics and other findings) to the Polyspace Access web interface for review
  • Setting up pass/fail criteria for builds based on Polyspace results
  • Filtering results based on predefined criteria such as file ownership or impact of defects
  • Sending e-mail notifications with new findings to file owners
For an overview of the plugin, see MathWorks Polyspace plugin.
For a quick start and example scripts, see MathWorks Polyspace plugin repository in Github.
For a more detailed tutorial, see the Polyspace documentation.

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!