BullseyeCoverage Up Contents Search

cov_copyFile - Copy Coverage File

int cov_copyFile(const char* path);

Description

Function cov_copyFile copies the coverage file named by the COVFILE environment variable to the file named path. Before copying, the function waits for pending operations on the input coverage file to finish.

If a BullseyeCoverage run-time error occurred prior to calling this function, no action is performed.

This function is automatically declared in source files compiled by covc. In other source files, declare it by including <BullseyeCoverage.h>.

This function is not available with the small footprint run-time configuration.

Return Value

If successful, the function returns 0. Otherwise, it returns one of the error codes listed in Run-Time Errors.

Example

#if _BullseyeCoverage
    cov_write();
    cov_copyFile("test2.cov");
    cov_reset();
#endif

See Also

covmgr option -o/--copy

Updated: 27 Jan 2025