cvs: php-gcov-web(SOC06) /cron build_time.php cron.php cron.sh

From: Date: Sun, 03 Sep 2006 15:47:00 +0000
Subject: cvs: php-gcov-web(SOC06) /cron build_time.php cron.php cron.sh
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-32291@lists.php.net to get a copy of this message
nlopess Sun Sep 3 15:47:00 2006 UTC Removed files: (Branch: SOC06) /php-gcov-web/cron build_time.php Modified files: /php-gcov-web/cron cron.php cron.sh Log: fix the build time calculation. http://cvs.php.net/viewvc.cgi/php-gcov-web/cron/cron.php?r1=1.1.2.6&r2=1.1.2.7&diff_format=u Index: php-gcov-web/cron/cron.php diff -u php-gcov-web/cron/cron.php:1.1.2.6 php-gcov-web/cron/cron.php:1.1.2.7 --- php-gcov-web/cron/cron.php:1.1.2.6 Mon Aug 21 04:02:24 2006 +++ php-gcov-web/cron/cron.php Sun Sep 3 15:47:00 2006 @@ -1,8 +1,8 @@ <?php -if ($argc != 6) +if ($argc != 7) { - die("cron.php requires 5 arguments: [tmp] [out] [phpsrc] [makestatus] [phpversion]\n\n"); + die("cron.php requires 5 arguments: [tmp] [out] [phpsrc] [makestatus] [phpversion] [buildtime]\n\n"); } define('CRON_PHP',true); @@ -12,12 +12,11 @@ $phpdir = $argv[3]; // Directory where the PHP build source files are located $makestatus = $argv[4]; // Make status from bash script (fail or pass) $phpver = $argv[5]; // The version identifier for this PHP build (i.e. PHP_4_4) +$build_time = $argv[6]; // the build time (in seconds) $workdir = dirname(__FILE__); // Get the working directory to simplify php file includes // Initialize core variables -$build_time = -1; // Total time required for build (build_time.php) - $totalnumerrors = 0; // Total number of errors (compile_errors.php) $totalnumwarnings = 0; // Total number of warnings (compile_errors.php) @@ -77,8 +76,12 @@ require $workdir.'/tests.php'; // Run the valgrind code require $workdir.'/valgrind.php'; - // Get the time it took to create the build - require $workdir.'/build_time.php'; + + // Grab the code coverage rate + if(preg_match('/Overall coverage rate: .+ \((.+)%\)/', $data, $matches)) + { + $codecoverage_percent = $matches[1]; + } } } // End check for pass make status for both client and server @@ -98,8 +101,8 @@ } catch(PDOException $e) { - // if error occurs this might be good to log - $version_id = 0; + print_r($e); + exit; } // If version > 0 then we have a valid PHP version @@ -132,17 +135,11 @@ // Graphs will be generated and the database updated with the latest build information if($makestatus == 'pass') { - //if(date('D') == 'Sun') - //{ - $graph_mode = 'weekly'; - require $workdir.'/graph.php'; - //} - - //if(date('d') == 1) - //{ - $graph_mode = 'monthly'; - require $workdir.'/graph.php'; - //} + $graph_mode = 'weekly'; + require $workdir.'/graph.php'; + + $graph_mode = 'monthly'; + require $workdir.'/graph.php'; // Do SQL updates for the specific PHP version $sql = 'UPDATE versions SET version_last_build_time=?, version_last_attempted_build_date=?, version_last_successful_build_date=? WHERE version_id=?'; http://cvs.php.net/viewvc.cgi/php-gcov-web/cron/cron.sh?r1=1.1.2.9&r2=1.1.2.10&diff_format=u Index: php-gcov-web/cron/cron.sh diff -u php-gcov-web/cron/cron.sh:1.1.2.9 php-gcov-web/cron/cron.sh:1.1.2.10 --- php-gcov-web/cron/cron.sh:1.1.2.9 Sun Sep 3 14:11:38 2006 +++ php-gcov-web/cron/cron.sh Sun Sep 3 15:47:00 2006 @@ -46,6 +46,7 @@ if [ $BUILD_VERSION = 1 ]; then BUILT_SOME=1 + BEGIN=date +%s OUTDIR=${OUTROOT}/${PHPTAG} PHPSRC=${PHPROOT}/${PHPTAG} @@ -101,7 +102,9 @@ echo "make failed" fi # End build failure or success - php ${WORKDIR}/cron.php ${TMPDIR} ${OUTDIR} ${PHPSRC} ${MAKESTATUS} ${PHPTAG} + BUILD_TIME=$[date +%s - ${BEGIN}] + + php ${WORKDIR}/cron.php ${TMPDIR} ${OUTDIR} ${PHPSRC} ${MAKESTATUS} ${PHPTAG} ${BUILD_TIME} fi # End verify build PHP version done

« previous php.mirrors (#32291) next »