Chapter 18. Execution

Test executables that have been linked using the Build/Tests operation against the current configuration can be executed by selecting Tools->Run Tests (Ctrl+F5).

When tests are run, the Configuration Tool looks for a platform name corresponding to the currently loaded hardware template. If no such platform is found, a dialog will be displayed for you to define one; this dialog is similar to that displayed by the Add function in the Tools->Platforms... dialog, but in this case the platform name cannot be changed.

When a test run is invoked, a property sheet is displayed, comprising three tabs: Executables, Output and Summary.

Note that the property sheet is resizable.

Three buttons appear on the property sheet itself: Run/Stop, Close and Properties.

The Run button is used to initiate a test run. Those tests selected on the Executables tab are run, and the output recorded on the Output and Summary tabs. During the course of a run, the Run button changes to “Stop”. The button may be used to interrupt a test run at any point.

Properties

The Properties button is used to change the connectivity properties for the test run and when pressed will bring up the dialog illustrated in Figure 18-1.

Figure 18-1. Properties dialog box

Download Timeout

This group of controls serves to set the maximum time that is allowed for downloading a test to the target board. If the time is exceeded, the test will be deemed to have failed for reason of “Download Timeout” and the execution of that particular test will be abandoned. This option only applies to tests run on hardware, not to those executed in a simulator. Times are in units of elapsed seconds.

Three options are available using the drop-down list:

  • Calculated from file size - an estimate of the maximum time required for download is made using the (stripped) executable size and the currently used baud rate

  • Specified - a user-specified value may be entered in the adjacent edit box

  • None - no maximum download time is to be applied.

Run time Timeout

This group of controls serves to set the maximum time that is allowed for executing a test on the target board or in a simulator. If the time is exceeded, the test will be deemed to have failed for reason of “Timeout” and the execution of that particular test will be abandoned. In the case of hardware, the time is measured in elapsed seconds: in the case of a simulator it is in CPU seconds.

Three options are available using the drop-down list:

  • None - no maximum download time is to be applied.

  • Specified - a user-specified value may be entered in the adjacent edit box

  • Default - a default value of 30 seconds is used

Connection

The Connection control is used to specify how the target board is to be accessed.

If the target board is connected using a serial cable, the Serial radio button should be checked. In this case you can select a port (On Windows COM1, COM2, … or on Linux specify the path to the serial device /dev/ttyUSB0, /dev/ttyS0) and an appropriate baud rate using drop-list boxes.

If the target board is accessed remotely using GDB remote protocol, the “TCP/IP” radio button should be checked. In this case you can select a valid host name or IP address and TCP/IP port number using edit boxes.

If the target board is accessed remotely using a command PIPE, the “Pipe” radio button should be checked and the command, including arguments, entered into the corresponding Command field. Do not include the Pipe “|” symbol in the Command - this is added by the eCos Configuration Tool.

Target Reset

The Target Reset control is used to specify how the target board is to be made ready (reset) before each test execution.

Three options are available using the drop-down list:

  • None - the test may be executed on the target hardware immediately. No reset is required, for example on a simulator, or the reset is performed by the hardware debugger controlling the target hardware: for example a Pipe command to openocd normally will reset and bring up the hardware in accordance with its scripts before accepting GDB commands from the Pipe, and similarly establishing a remote TCP/IP connection to a JTAG debugger such as the Ronetix PEEDI will normally configure and reset the hardware accordingly.

  • Command - the user-specified command, complete with arguments, to reset the target hardware and make it available for downloading and executing a test must be entered in the adjacent edit box. This command must be on the PATH and must terminate with a zero exit code on successful execution and reset of the target hardware. All output from the command will be displayed in the Output tab of the Run dialog. A non-zero exit code will terminate the execution of tests.

  • Manual - this is the default behaviour where the user is instructed to reset the target hardware and press OK when the target hardware is ready to execute a test or Cancel to terminate the execution of the selected tests.

2017-02-09
Documentation license for this page: Open Publication License