Example #1
0
/**
 * \brief make coverage for a test
 *
 * @return null on success, string on failure.
 */
function MakeCover($unitTest)
{
    if (empty($unitTest)) {
        return NULL;
    }
    // make coverage
    $lastCovr = exec('make coverage 2>&1', $covrOut, $covrRtn);
    //echo "DB: Exit status of 'make coverage' of $unitTest is:$covrRtn\n";
    $Cover = new RunTest($unitTest);
    if ($covrRtn != 0) {
        if ($Cover->checkMakeErrors(implode("\n", $covrOut))) {
            echo "Error: 'make coverage' of {$unitTest} did not succeed, " . "return code:{$covrRtn}\n";
            $covrOut = array();
            return $unitTest;
        }
    }
    return NULL;
}