主要内容

Libraries for external tests

Specify precompiled libraries for building external tests

Since R2023b

Description

External tests are developed using a supported third-party framework. Specify the precompiled objects (*.o/*.obj), static libraries (*.lib/*.a), and dynamic libraries (*.dll) required by the external tests. Polyspace® Test™ links these libraries with your source files and test code to build the test executable. This option does not apply to static analysis.

Set Option

In your Polyspace Platform project configuration, on the Build tab, select the External Tests node and then enter library names for this option.

Why Use This Option

In Polyspace Test, you can add external tests that use a supported third-party framework, such as GoogleTest. These tests might require libraries specific to the framework. Use this option to specify the precompiled libraries required to build the external tests correctly. Polyspace Test searches for the specified libraries when building the project.

Dependencies

You must also specify the path to the folders containing your libraries for external tests using the option Library paths for external tests.

Limitations

Polyspace Test supports only 64-bit precompiled libraries.

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 — You might be able to provide precompiled libraries directly to your compiler as part of your build command. For instance, if you use gcc, use the option -l to specify libraries during command line compilation.

Version History

Introduced in R2023b