Reinstrumentation after Changing Some Files

Assume we have an instrumented program, with which we have done some test runs and got some coverage reports. Now we change some files and want to continue the testing. How to handle this in Testwell CTC++?

One usage convention is that everything is rebuilt as if Testwell CTC++ is used for the first time. All source files are recompiled and reinstrumented.

The important question is: Is the data file reused? If not, all coverage data is built up from scratch. If the data file is reused, the symbol file does not need to be available anymore. When the tests are executed, two possible results can be distinguished:
  1. For a file that was actually changed, the old coverage data is overwritten. All counters for this file are starting from 0.
  2. For an unchanged source file, the old coverage data is kept. All counters for this file are starting from the value of the last test run.

If the build process has the dependency rule to compile only those sources that have changed, it works seamlessly also in builds with ctc.