This part of the User’s Guide documents how to use C++test to test source code that is designed to be compiled/built using Wind River Tornado compilers and/or written with the aid of the Wind River Tornado IDE. It covers the C++test features that specifically support Tornado, as well as the Tornado features that you should understand in order to perform testing with C++test. For additional details on general C++test functionality, refer to the other parts of the C++test User’s Guide.

This topic provides basic information about C++test’s support for Wind River Tornado.

Sections include:

Support Overview

Both C++test standalone and the C++test Eclipse plugin allow C++test to be used with Tornado—no special integration is required.

C++test doesn't actually "integrate" with the Tornado development environment; rather, it is preconfigured to support Tornado’s set of compilers, allow C++test projects to use these compilers, and allow complete Tornado projects to be imported into the C++test workspace.

Supported Tornado Versions and Compilers

C++test supports Tornado 2.0 and 2.2. Both versions come with their own compilers:

This table lists Tornado-shipped compilers and details their C++test family and configuration names*:

 

Tornado VersionShipped CompilersC++test FamilyC++test Configurations
2.0egcs-2.90Wind River EGCS 2.9wregcs_2_9
2.2gcc-2.96, DIAB-5.0**Wind River GCC 2.9, Wind River Diab 5.0**wrgcc_2_9 , diab_5_0

 

*The configuration name is the name of a subdirectory under the C++test compilers’ main configuration directory, which is where the compilers’ configuration data are stored. By default, this is at C++test_install_dir/engine/etc/compilers/config_name.

**Or higher DIAB version starting from 5.0.1.

The VxWorks versions shipped:

Prerequisites

For C++test itself, the standard rules apply. If you have the standalone C++test Eclipse product installed, then no extensions are needed (CDT is already included). If you have an Eclipse plugin, then you must also install the CDT (C++ Development Tools) extension into Eclipse. See Installation for details.

To allow testing with Tornado compilers, you must have the following special Tornado environment variables set prior to launching C++test (we assume that you either have the Tornado development environment installed properly or you have one or more Tornado compilers installed by other means):

We also recommended putting the Tornado executables on the PATH variable. For example,

"set PATH=%WIND_BASE%\host\%WIND_HOST_TYPE%\bin;%PATH%"
"set PATH=%DIABLIB%\WIN32\bin;%PATH%"

The Tornado-shipped batch script (%WIND_BASE%\host\%WIND_HOST_TYPE%\bin\torVars.bat) performs all recommended environment initialization. When you run C++test from a POSIX-like shell, you can create a shell script based on torVars.bat.

For static analysis, setting the environment is sufficient. For unit testing, the following tools must also be present (see Executing Test Objects):

Known Limitations

Limitations of C++test:

Limitations of Tornado tools:

Limitations of VxWorks-5.4 & VxWorks-5.5:

Mangling Workaround

Tornado's GNU toolchain uses different mangling schemes for the simulator (VxSim) and for other platforms. For VxSim, the scheme is adjusted to be Microsoft/Windows/Cygwin-compatible with additional underscores prepended to C-symbols and other differences in complex C++ mangling.

In C++test nomenclature, VxSim mangling schemes are called gcc-cygwin/g++2-cygwin respectively for C/C++, while names for all other platforms are gcc/g++2. C++test is prepared to test initially for VxSim and currently unable to adjust its mangling scheme automatically. As a result, you need to make this adjustment manually for other platforms.

There are two ways to adjust this mangling scheme manually:

Here are the details on how to use the second method listed above:

  1. Choose File> New> Other.
  2. Select C++test> Custom Compiler, then click Next.
  3. Select Add custom compiler, then click Next.
  4. Specify the custom compiler as follows:
    1. Enter a meaningful name for the compiler.
    2. Select either Wind River EGCS 2.9 or Wind River GCC 2.9 under compiler family.
    3. Provide the correct compiler/linker executables.
  5. Make any desired adjustments to the compiler's identifier (e.g. if  the configuration is to be shared), then click Next.
  6. In the last 3 edit boxes, mark the location where your compiler configuration files are to be generated, then click Finish.
  7. Using an external file system navigator, open the marked location.
  8. Edit the c.psrc file and append symmatcher.manglingSchema gcc
  9. Edit the cpp.psrc file and append symmatcher.manglingSchema g++2
  10. Save both files.
  11. To prompt C++test to pick the changes, restart it.
  12. Select your new compiler configuration for any project in the Build Settings> Compiler settings> Family area of the C++test project properties panel.