Tests

This subdirectory is defined by the testsdir keyword in the /etc/ccursim.conf file and contains all the test configuration and data files.

Each individual test is stored under its own directory whose name is the name of the test as it appears in the Control Center.

Each specific test subdirectory contains the following ASCII files:

File

Description

description

Free format text description of the test.

resources

A line of comma-separated keyword=value pairs that define the Script and RTW programs for the test as well as the RTDB to load and the fixed step size (in microeconds) at which to run the individual sessions.

modelname.x.prop

A line of comma separated keyword=value pairs that define the cpu affinity, priority for and execution order for this model in the test.

Each test also contains a subdirectory called InitialConditions where individual initial conditions sets are stored. Each initial condition set is within its own directory whose name is the name of the set. The initial condition set subdirectory contains a file for each RTW model that are run under the test and one for the RTDB items:

File

Description

parm_modelname_x.txt

Initial values for the Simulink parameters. x is the instance of the model when multiple instances of the same model is run as part of the test

rtdb.ItemsIC.txt

Initial values for the items in the RTDB.

The test subdirectory also holds a separate subdirectory for each test session created. The name of the session subdirectory is the name of the test session. The session can be autocreated from a set of default parameter via the Test Run/Playback GUI or it can be created beforehand in the Control Center and then selected for a test run. When running the same session multiple times, you must be aware that any data that was logged as part of a previous run of the session will be overwritten.

The session subdirectory contains the following files:

File

Description

description

Free format text description of the test session.

setup

One line of comma separated keyword=value pairs that define the frame rate in microseconds and duration in frames for the test, the maximum number of overruns allowed as well as the maximum number of consecutive overruns allowed.

results

One line of comma separated keyword=value pairs with the results of the test session run.

The recognized keywords for the setup file are:

Keyword

Description

framerate

Main simulation loop frame length in micro seconds.

runframes

Number of frame to run the test. 0 to run indefinitely.

maxoverruns

Maximum number of overruns allowed without aborting the test.

maxconsecutiveoverruns

Maximum consecutive number of overruns before aborting the test.

initconditions

The name of the initial condition set to use for this run.

nodatalogging

1 to not start the data logger for this test.

nodirectio

TODO: is this real?  See directio below.

1 to not buffer the data logger write buffers and thus allows data logger extraction while the test is running. Not using direction affects the system performance and might lead to data loss when logging a large number of data points.

schedtype

The scheduler to use for this run:

0 (default: RCIM/FBS with default rtc0)

1 (use existing FBS scheduler)

2 (configure FBS with the given device and key)

3 (software timer)

4 (red line scheduler - spinning)

fbskey

The FBS key number

 

fbsdevice

The FBS device to use. I.e. rtc0..rtc3, eti0..eti3.

 

directio

1 or 0. Whether the data logger should use direct I/O when writing the data file or not. Running with direct I/O enabled allows for higher write performance and minimize the use of O/S disk buffers. On the other hand, when using direct I/O the data will be buffered internally by the data logger and will only be available for viewing or processing after the internal have been flushed.

 

Recognized keywords for the results file are:

Keyword

Description

starttime

Starting time in seconds:microseconds since Jan 1, 1970 format for the test session.

stoptime

Time in seconds:microseconds since Jan 1, 1970 of when the test session was stopped.

status

Numerical value for the termination status for the test run. Negative status codes correspond to error conditions.

-101 (Did not initialize properly)

-102 (The user aborted the test run)

-103 (Abort due to too many overruns)

-104 (TDL user program aborted the test run)

-105 (Data logger error caused the test to abort)

-106 (An I/O task caused the test to abort)

-107 (The RTW failed initialization)

-108 (Abort caused by data reader error when in playback mode)

1 (Test completed successfully)

2 (TDL user program stooped the test after a successful run)

3 (Successful stop at end of recording when in playback mode)

testoverruns

How many overruns were detected during the test run.

Additionally, the session directory contains a log subdirectory where the default system log file (defaultlog) is written and the rtdata subdirectory that holds the data logger log files.

Additional subdirectories

Under the testdir directory, there exists 2 fixed name directories:

File

Description

TestReports

Holds the html files for the test report subsystem. This has the same hierarchy as the test/session directory structure described above where the HTML files for a specific session run kept within its own session directory.

TestSuites

Holds the definition for multitest runs as well as individual directory for each run.