Deferred initialization of Runtime Library

Andrey MadanAndrey Madan Posts: 378 ✭✭✭
edited July 28 in C/C++test

In some cases where runtime library during initialization needs to have some software/hardware components to be up and running and initialized prior to initialization. e.g.: RTOS.
By default: When collecting application level coverage, runtime library is being initialized as early as fist instrumented line of code is being executed. In order to NOT automatically initialize runtime you need to do the following:

1) Need to build runtime differently.

Add the CPPTEST_AUTO_INITIALIZATION=0 to the list of your macros during building runtime library:


2) need to add this trigger in code (e.g. right after OS_Init) to initialize parasoft runtime:

#include "cpptest.h"

Sign In or Register to comment.