svn: /web/php-gcov/trunk/cron/ compile_results.php

From: Date: Sat, 11 Dec 2010 18:11:31 +0000
Subject: svn: /web/php-gcov/trunk/cron/ compile_results.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-9689@lists.php.net to get a copy of this message
felipe Sat, 11 Dec 2010 18:11:31 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=306231 Log: - Added warning by mail (QA list) when build on GCOV box is broken Changed paths: U web/php-gcov/trunk/cron/compile_results.php Modified: web/php-gcov/trunk/cron/compile_results.php =================================================================== --- web/php-gcov/trunk/cron/compile_results.php 2010-12-11 18:06:49 UTC (rev 306230) +++ web/php-gcov/trunk/cron/compile_results.php 2010-12-11 18:11:31 UTC (rev 306231) @@ -40,6 +40,7 @@ preg_match_all($gcc_regex, $data, $data, PREG_SET_ORDER); $compile_results = array(); +$mail_error = array(); $phpdir_len = strlen($phpdir); if ($phpdir[$phpdir_len-1] != '/') { @@ -65,6 +66,8 @@ $msg = $error[$i+2]; if ($type === 'error') { + // Only send to list error messages + $mail_error[$filepath][] = array($function, $line, $msg); ++$totalnumerrors; } else { ++$totalnumwarnings; @@ -78,3 +81,21 @@ ksort($compile_results); file_put_contents("$outdir/compile_results.inc", serialize($compile_results)); + +if (!empty($mail_error)) { + $mail_message = ''; + + foreach ($mail_error as $path => $fileentry) { + $mail_message .= sprintf(">>> File: %s\n", $path); + + foreach ($fileentry as $entry) { + $mail_message .= vsprintf("Function: %s:%d (%s)\n", $entry); + } + } + + mail('php-qa@lists.php.net', + sprintf('[PHP-GCOV] Build error - %s', $phpver), + $mail_message, + 'From: PHP GCOV <php-qa@lists.php.net>', + '-f noreply@php.net'); +} \ No newline at end of file

« previous php.webmaster (#9689) next »