This section explains how to configure and run runtime testing. It covers:
Customizing Built-in Test Configurations
C/C++test provides the following Test Configurations to run tests using TRACE32 tools:
- Embedded Systems/Lauterbach TRACE32/Run Tests using TRACE32 (FDX)
- Embedded Systems/Lauterbach TRACE32/Run Application with Memory Monitoring using TRACE32 (FDX)
Test Configurations can be customized using the following test execution flow properties:
- Core: The value of this property is used as an argument for "System.CPU" debugger command. Specify your development target's core as the value of this property.
Test executable exit point: The value of this property will be used to set a break point (Break.Set debugger command) that will mark the end of test execution. Typically, _exit symbol or similar should be used for this purpose.
- Path to TRACE32 executable: Used to run TRACE32 debugger with the automatically-generated test script (t32xxx.exe -s <test execution script>). Select a debugger program executable from your development environment.
- TRACE32 configuration file: Should be specified only if a non-default configuration file must be used for the TRACE32 executable (t32xxx.exe -c <config file>)
Lauterbach TRACE32 test configurations automate:
- Test executable preparation
- Test executable upload to the target or simulator
- Test execution
- Results collection
Test executable uploading, execution and results collection is performed with help of a Lauterbach PRACTICE II script that is generated by C++test. The script is generated based on a template available in <CPPTEST_INSTALL_DIR>/bin/engine/
etc/templates/for_recipes/t32_fdx.tja
.
You can customize this template as needed. To use a customized version of this script template:
- Make a copy of the original version of this script.
- Edit it as desired.
Modify the Test Configuration’s test flow definition to use the customized version rather than the original script template. The script template path is specified in a flow step with id="db_scr_gen".
Unit Testing
The "Embedded Systems/Lauterbach TRACE32/Run Tests using TRACE32 (FDX)"Test Configuration is provided to facilitate the unit testing process.
To run unit testing using TRACE32:
- Manually create or automatically generate a set of test cases.
- Duplicate the "Run Tests using TRACE32 (FDX)" Test Configuration.
- Modify the Test Configuration as needed. See Customizing Built-in Test Configurations for details.
- Select the desired testing context.
- Run tests with the customized Test Configuration created above.
Debugging Test Cases
Use External Embedded debugging mode. For more details see:
Application Monitoring
To run application monitoring using TRACE32:
- Duplicate the "Embedded Systems/Lauterbach TRACE32/Run Application with Memory Moni-toring using TRACE32 (FDX)" Test Configuration.
- Modify the Test Configuration as needed. See Customizing Built-in Test Configurations for details.
- Select the desired testing context.
- Run tests with the customized Test Configuration created above.