The Data File Converter ctc2dat

If HOTA is used, the coverage data is written in textualized form, usually to a text file MON.txt. With ctc2dat, this input is converted to the standard data file format ("MON.dat").

Example for the call

ctc2dat -i MON.txt -o MON.dat


-h, -H [search-term]
Option -h gives a short help of the available options. Option -H opens the tool page of ctc2dat in Testwell CTC++ Help. When followed by a search term, the search function of Testwell CTC++ Help is opened with this term instead.
-i inputfile
The input text-encoded coverage data file, normally MON.txt. In the absence of this parameter, the input is read from stdin.
-o outputfile
The output data file name, including its possible path. In the absence of this option, the output data file name and path is derived from each instrumented file and from the environment variables CTC_DATA_PATH and CTC_DATA_NAME, if defined. This output file is further processed with ctcpost to generate coverage reports..
Brief log messages are written to stdout.
No log messages are written to stdout. In the absence of options –b or –s, the tool runs in verbose mode and writes some more messages about its processing to stdout.

The input

ctc2dat is able to process input data in two different forms. In the default implementation, the MON.txt looks like:
Dump of CTC++ coverage data from target memory at Wed May 09 10:54:20 2018:


In this example, coverage data for three source files ("MODUL") was stored in one step.

If a debug log is used to bring the coverage data to the host, each line shall be started with "CTCDATA:". Then the whole log can be used as an input, and ctc2dat sorts out all other lines.