Contenuto principale

Folders to ignore (-ignore-dir)

Specify folders to ignore during instrumentation

Since R2023b

Description

When instrumenting source code for code coverage and execution profiling calculations, specify the folders that Polyspace® Test™ ignores.

Set Option

Set the option using one of these methods:

  • Polyspace Platform user interface (desktop products only): In your project configuration, on the Testing & Profiling tab, select the All Profiling node and then enter folder paths for this option.

  • Command line: Use the option -ignore-dir. See Command-Line Information.

Why Use This Option

Skip instrumenting source files from certain folders, such as folders containing your test cases. Use this option to scope your code coverage and execution profiling calculations to relevant folders.

Settings

No Default

Enter folders to ignore. You can add as many folders as necessary.

  • Add a single folder by clicking the Add empty row button and entering the path to the folder.

  • Navigate to a folder by clicking the Add folder button .

  • Add or update multiple folder paths by clicking the Add/edit multiple rows button and entering one path per line in the Add/edit multiple rows dialog box. Leading and trailing spaces are trimmed, and empty lines are ignored.

Dependencies

Specifying the same folder as an input to this option and the option Folders to profile (-limit-instrumentation-to) results in an error.

Command-Line Information

The command-line workflow for setting this option depends on your workflow.

  • If you build your source and tests using a Polyspace Platform Project — Once you set this option in the project using the Polyspace Platform user interface, you cannot override or modify this option using the polyspace-test command.

  • If you build your sources and xUnit tests using your own toolchain — Specify this option to the polyspace-code-profiler command.

Parameter:-ignore-dir
Default: N/A
Example: polyspace-code-profiler -instrument -instrum-dir instrumFolder -ignore-dir folderToIgnore -- compileCommand

Version History

Introduced in R2023b