Main Content

polyspace.test.BuildResults Class

Namespace: polyspace.test

(Python) Review test results

Since R2026a

Description

This Python® class contains results from building a Polyspace® Platform project.

Creation

Description

buildResults=polyspace.test.build(proj) builds a test executable using the sources, tests, and build configuration from the project proj. For extensions of this syntax, see polyspace.test.build.

Input Arguments

expand all

Name of the polyspace.project.Project object that contains the code and tests that you are building.

Example: myProject=polyspace.project.Project(newProj.psprjx)

Properties

expand all

Since R2026a

Build log information, returned as a polyspace.ExecutionLog object with the following property:

PropertyDescription
Content

Build log content, specified as a single string.

To display the build log string from a polyspace.test.BuildResults object buildResults in a human readable format, enter:

print(buildResults.BuildLog.Content)

To save the build log content to a file, use the save() method. For instance, to save the error string from a polyspace.test.BuildResults object buildResults to a file logs.txt, enter:

buildResults.BuildLog.save("logs.txt")

Note

This property contains the logs from a successful project build. If an error occurs during project build, the polyspace.test.build() function throws an exception of type polyspace.ErrorWithLog. Catch this exception in an except block to see the error log content. For more information, see polyspace.ErrorWithLog.

Version History

Introduced in R2026a