Testing on Targets Using Existing Toolchain Setup
Set up communication with target, build and run tests on target
If your tests are authored using the Polyspace® Test™ C/C++ xUnit API, you can build them in your own development environment using an existing toolchain setup and run them on a target board. You can then retrieve the test execution results or code profiling results on your host computer and convert them to a supported format for review in the Polyspace Platform user interface.
System Commands
polyspace-code-profiler | (System Command) Profile your source code for calculating C/C++ code coverage, code execution time, and memory use |
polyspace-test -monitor | (System Command) Monitor execution of C/C++ xUnit tests and retrieve test and code profiling results |
polyspace-test -convert | (System Command) Convert test or code profiling results to standard Polyspace Test format |
polyspace-test -generate | (System Command) Generate test registration function from a set of Polyspace Test C/C++ test files |
Topics
Test Execution
- Run C/C++ Tests on Target Using Existing Toolchain Setup
Create test executables by compiling your source and xUnit based tests. Run the test executable on target. - Optimize xUnit Test Executables for Embedded Targets
For embedded targets, generate compact xUnit test executable and interpret the test results. - Configuration Macros in Polyspace Test API for C/C++ Code
Look up the configuration macros that you can use to configure the behavior of the test executable.
Code Profiling
- Calculate C/C++ Code Profiling Metrics by Using xUnit API-Based Tests on Target
Calculate the code coverage of your xUnit tests and the execution profile of your code by running an instrumented test executable on a target hardware. - Create Library for Code Profiling Using Self-Managed Builds
Create library containing definitions of code instrumentation macros for cases where precompiled libraries included with Polyspace Test are not compatible with your toolchain.