IBM Support

How to setup Teat RealTime to not analyse macro in source code

Technote (FAQ)


How do you get macro in source code not to be analysed when using IBM Rational Test RealTime?


Your source code includes a macro, for example SAMPLE_CRITICAL_SECTION(), while you do not like the macro not to be alalysed during test by changing the source code as shown below.

#ifdef RTRT_REST
#pragma attol stop_analyze
#ifdef RTRT_REST
#pragma attol start_analyze

Note: SAMPLE_CRITICAL_SECTION( ) is a macro.


SAMPLE_CRITICAL_SECTION is already a macro so you can change its definition in the parser settings or even on the preprocessing command line through -D option in Rational Test RealTime.

For example, change the definition using the preprocessing command line as follows:

  1. Go to Build > Compiler > Preprocessing-only flags

  2. Add the following parameter:
    • -DSAMPLE_CRITICAL_SECTION="#pragma attol stop_analyze;<actual code>;#pragma start_analyze"

Document information

More support for: Rational Test RealTime
General Information

Software version: 8.0

Operating system(s): Windows

Reference #: 1633200

Modified date: 03 April 2013