主要内容

Test output options

Specify command-line flag for external test output file path

Since R2024b

Description

Enter the command-line flag that you use with your C/C++ external tests to specify a test output file path.

  • When you run external tests in the current Polyspace® Platform project, this flag is appended to the test executable.

  • When you open results of external tests, the test output file path is used to locate the results.

Set Option

In your Polyspace Platform project configuration, on the Project tab, select the External Tests node and then enter a command-line flag for this option.

Why Use This Option

Use this option to emulate your command-line execution of external tests. External tests are tests written using a test authoring framework other than Polyspace Test™.

For instance, when running external tests, you might be generating the test output in a specific location. If you run the same external tests from within a Polyspace Platform project, you can use this option to generate the test output in the same location.

For more information on the full workflow, see Run External C/C++ Tests in Polyspace Platform User Interface.

Settings

Enter the command-line flag that you use with your external tests to specify a test output file path. Use the variable $(TESTOUTPUT) to indicate the output file path (in this case, the output gets generated in a predetermined location and opened from that location). For instance:

  • GoogleTest:

    --gtest_output="xml:$(TESTOUTPUT)"
  • Boost:

    --log_sink=$(TESTOUTPUT)

If your external test framework does not provide flags to specify a result file location, use the option Test output file to directly specify the output location.

Dependencies

This option is available only if you select one of these options:

Version History

Introduced in R2024b