polyspace.project.OwnedBuildConfiguration Class
R2026bNamespace: polyspace.project
Description
The properties of the polyspace.project.OwnedBuildConfiguration class
contain the build-related configuration options attached to a specific Polyspace® Platform project. These properties correspond to the build options listed in
Polyspace Test
options, Polyspace Bug Finder
options (Polyspace Bug Finder), and Polyspace Code Prover
options (Polyspace Code Prover).
To create modular projects, where project components like configurations and graphical
tests are saved in separate files, consider using external configurations. An external
configuration is a build, static analysis, or testing and profiling configuration that is
saved in a separate file that is referenced by the project. To work
with external build configurations in the Polyspace
Python® API see polyspace.project.BuildConfigurationRef and polyspace.project.BuildConfiguration. For more information about project structure,
see Modularize Project by Using External Configurations, Test References, and External Stub Files.
Build configurations created from a build command (using
polyspace-configure) or from Polyspace for AUTOSAR workspaces cannot be converted to external configurations or removed
from the project. To save a copy of these configurations to a file, use the
export() method.
Creation
Syntax
Description
Create Build Configuration
creates a new buildConfig = proj.BuildConfigurations.create(configName)polyspace.project.OwnedBuildConfiguration object with the
Name property set to configName and all other
properties set to their default values. The resulting buildConfig
object is attached to the polyspace.project.Project object proj.
Load Build Configuration
loads the existing buildConfig = proj.BuildConfigurations[configName]polyspace.project.OwnedBuildConfiguration object with
the Name property set to configName from the
polyspace.project.Project object proj.
Create Copy of Build Configuration
creates a new buildConfig = proj.BuildConfigurations.createFrom(existingConfigObj)polyspace.project.OwnedBuildConfiguration object by copying
an existing owned build configuration existingConfigObj and
attaches this copied object to the polyspace.project.Project object
proj. To assign a unique name to buildConfig,
Polyspace uses the Name property of
existingConfigObj and appends the next available numeric
suffix.
creates a new buildConfig = proj.BuildConfigurations.createFrom(existingConfigObj, configName)polyspace.project.OwnedBuildConfiguration object by copying
an existing owned build configuration existingConfigObj and
attaches this copied object to the polyspace.project.Project object
proj. Use the configName argument to set the
Name property of the resulting object.
creates a new buildConfig = proj.BuildConfigurations.createFrom(existingConfigFile)polyspace.project.OwnedBuildConfiguration object by copying
the build configuration defined in the file existingConfigFile, and
attaches this object to the polyspace.project.Project object
proj.
creates a new buildConfig = proj.BuildConfigurations.createFrom(existingConfigFile, configName)polyspace.project.OwnedBuildConfiguration object by copying
the build configuration defined in the file existingConfigFile and
attaches this object to the polyspace.project.Project object
proj. Use the configName argument to set the
Name property of the resulting object.
Convert Build Configuration
buildConfig = proj.BuildConfigurations.moveAsOwned(
converts the build configuration that the project existingConfigRefObj)proj references
through existingConfigRefObj to a
polyspace.project.OwnedBuildConfiguration object and removes
existingConfigRefObj from the project.
Input Arguments
Properties
Methods
Version History
Introduced in R2024aSee Also
polyspace.test.run | polyspace.test.build | polyspace.project.Project | polyspace.project.BuildConfigurationRef | polyspace.project.OwnedStaticAnalysisConfiguration | polyspace.project.OwnedTestConfiguration | polyspace.test.TestResults
Topics
- Get Started with Python API for Polyspace
- Create Easily Shareable Projects for Version Control
- Share and Reuse Configuration Variants
- Modularize Project by Using External Configurations, Test References, and External Stub Files
- Modularize Existing Project by Using Polyspace Python API
- Create Project Dynamically by Using Polyspace Python API