Chapter 18. Execution

Test executables that have been linked using the Build/Tests operation against the current configuration can be executed by selecting ToolsRun 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 ToolsPlatforms... 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.

18.1. 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, “Properties dialog box”.

Figure 18.1. Properties dialog box

Properties dialog box

18.1.1. 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.

18.1.2. 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

18.1.3. 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.

18.1.4. 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.

18.2. Executables Tab

This is used to adjust the set of tests available for execution. A check box against each executable name indicates whether that executable will be included when the Run button is pressed. The Check All and Uncheck All buttons may be used to check or uncheck all items. Items may also be individually checked or unchecked.

When the property sheet is first displayed, it will be pre-populated with those test executables that have been linked using the Build/Tests operation against the current configuration.

Figure 18.2. Run tests

Run tests

Highlighting items in the list and clicking the Remove button will remove those executables highlighted. Clicking the Add button will display a dialog box that allows you to add to the set of items. Equivalently the Add from folder.. button may be used to add add a number of executables in a specified folder (optionally including subfolders, if you click on Yes when asked).

Figure 18.3. Add files from folder

Add files from folder

18.3. Output Tab

This tab is used to display the output from running tests. The output can be saved to a file or cleared by means of the popup menu displayed when you right-click in the window.

18.4. Summary Tab

This tab is used to display a record, in summary form, of those tests executed. For each execution, the following information is displayed:

  • Time - the date and time of execution

  • Host - the host name of the machine from which the test was downloaded

  • Platform - the platform on which the test was executed

  • Executable - the executable (file name) of the test executed

  • Status - the result of executing the test. This will be one of the following:

    • Not started

    • No result

    • Inapplicable

    • Pass

    • DTimeout

    • Timeout

    • Cancelled

    • Fail

    • Assert fail

  • Size - the size [stripped/unstripped] of the test executed

  • Download - the download time [mm:ss/mm:ss] used. The first of the two times displayed represents the actual time used: the second the limit time.

  • Elapsed - the elapsed time [mm:ss] used.

  • Execution - the execution time [mm:ss/mm:ss] used. The first of the two times displayed represents the actual time used: the second the limit time.

The output can be saved to a file or cleared by means of the popup menu displayed when you right-click in the window.