使用自管理编译在目标上运行测试
R2026b与目标建立通信、编译测试并在目标上运行测试
在测试是使用 Polyspace® Test™ C/C++ xUnit API 编写的情况下,您可以使用交叉编译器编译测试,将它们烧录到目标板,并通过串行或 TCP/IP 连接检索测试结果:
polyspace-test -monitor -com serial -port COM6 -baud 115200 -results-dir results -- flash_and_run.batpolyspace-test -monitor 命令处理结果收集和转换,以便在 Polyspace 平台用户界面中进行审查。
系统命令
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 |
主题
测试执行
- Run C/C++ Tests on Target Using Self-Managed Builds
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. - Collect Test and Code Profiling Results from Target Using Self-Managed Builds
Collect both xUnit test results and code profiling results from target hardware using self-managed builds.
代码探查
- 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. - Collect Test and Code Profiling Results from Target Using Self-Managed Builds
Collect both xUnit test results and code profiling results from target hardware using self-managed builds. - 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.
特定于版本的更改
- Changes to Self-Managed Build Workflows in Polyspace Test in R2026b
Find all changes you need to make in your build scripts starting R2026b for self-managed builds using Polyspace Test.