Stub source folders
Add stub source folders to Polyspace Platform project
Since R2026a
Description
Add folders of C/C++ stub source files to a Polyspace Platform project or see stub source folders explicitly added to the project.
Set Option
In your Polyspace Platform project configuration, enter folder paths for this option on the Project tab.
Why Use This Option
For dynamic testing with Polyspace® Test™, you can work around undefined functions and variables by creating stubs. One way to stub undefined functions and variables is by creating an external C/C++ stub file. You can use this option to add folders of C/C++ stub files to your project.
In a regular workflow, you might be adding stub source folders using one of these methods:
Option Add Stub Source Folder on the Polyspace Platform toolstrip.
Right-click option Add Stub Source Folder on the Test Artifacts node of a Polyspace Platform project.
You see each stub source folder as a new row listed under the Stub source folders option. The stub source folder path is added relative to the project path. For more information, see Create Project and Add Source Files in Polyspace Platform User Interface.
You can use this option to add stub source folders by absolute path, or to add stub source folder locations using a project or system environment variable. These features are not available when adding files using the other methods.
Settings
You can add a stub source folder by absolute or relative path:
Select
to add the absolute path to a stub source
folder.Select
to add a stub source folder relative to the project
path.
You can also edit an existing path. Editing an existing path is useful when you
use a project variable or a system environment variable as a shorthand in your paths. You can
first enter an absolute path using the
button and replace part of the path with a project variable
or system environment variable. For more information, see Project
variables.
To remove a stub source folder, select the corresponding row and click
.
Version History
Introduced in R2026a