Polyspace UT cannot traverse subfolder structure

2 vues (au cours des 30 derniers jours)
Nagarajan
Nagarajan le 10 Oct 2022
Commenté : Anirban le 13 Oct 2022
While performing unit testing using Polyspace facing issues to travese subfolder header files.
Is Polyspace supporting such option? If yes please let me know the procedure.

Réponse acceptée

Anirban
Anirban le 12 Oct 2022
Modifié(e) : Anirban le 12 Oct 2022
If I understand the question correctly, you are adding a path to an include folder but the subfolders are not being traversed. Indeed, you have to explicitly add paths to all folders in your Polyspace project.
If you set up a project in the Polyspace user interface, during project setup, there is a check box Add recursively that automatically adds paths to a subfolder if you provide the path to a top level folder (see image below).
If you are running analysis at the command line, you have to add a -I to every subfolder. You can write a script to generate -I's to a subfolder given a top level folder, or set up a project in the Polyspace user interface using the above convenient check box and generate an options file for runs at the command line.
  2 commentaires
Nagarajan
Nagarajan le 13 Oct 2022
One clarity needed that if a project contains multiple folders (.c & .h) each contains it's own includes also need to be proceed same.
Pls clarify.
Anirban
Anirban le 13 Oct 2022
Yes, if all those folders have a common parent folder, you can add the parent folder recursively. Otherwise, you can add each folder individually.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by