Main Content

Submit Polyspace Files to Version Control

To share a Polyspace® Platform project and keep it in sync with its resources, you can submit source code files and certain Polyspace files to your version control system. This topic describes the files you need to submit, the generated files to exclude from your version control system, and how to work with Polyspace files in version control.

Code Files to Submit

Submit these code files to your version control system:

  • All application source files

  • All application header files

  • Any test files authored using the Polyspace Test™ xUnit API

  • Any test files authored using an external xUnit test authoring framework such as GoogleTest

Polyspace Files to Submit

Depending on how you structure your project, there are several Polyspace files to submit to version control. These can include:

Generated Files to Exclude

When you build or run static analysis or tests on a project, Polyspace generates files in an artifacts folder and a results folder. Do not submit these folders of generated files to version control. For more information on these generated files, see Artifacts and Results Generated by Polyspace Platform Projects.

Working with Polyspace Files in Version Control

You can interact with Polyspace files in a version control system like any other file. In a typical Polyspace workflow that uses version control, you may perform these actions:

  1. Check out the project file and any referenced files that need updating (sources, xUnit tests, .pscfg configuration files, .pstestd graphical test files)

  2. Open the project in the Polyspace Platform user interface.

  3. Make necessary changes, for instance:

    • Add source files.

    • Modify or add new tests. To modify an existing graphical test case that is referenced by the project, check out the referenced .pstestd file first. If you add a new graphical test, convert it to a test reference and submit the referenced .pstestd file along with the updated project file.

    • Change configuration options. To modify an external configuration, check out the referenced .pscfg configuration file first. If you add a new configuration variant, convert it to an external configuration and submit the referenced .pscfg file along with the updated project file.

  4. Verify the changes, for instance:

    • Make sure that the project continues to build successfully.

    • Run tests to make sure they pass.

    • Run static analysis and confirm that you did not introduce any new issues.

  5. Compare your version of the project and any supporting files you updated with the versions in source control and resolve any merge conflicts.

  6. Submit the updated .psprjx project file and any supporting files you changed or added.

See Also

Topics