For Programmers: Free Programming Magazines  


Home > Archive > PHP Mirrors > October 2006 > cvs: php-gcov-web(SOC06) /cron valgrind.php









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: php-gcov-web(SOC06) /cron valgrind.php
Nuno Lopes

2006-10-21, 7:57 am

nlopess Sat Oct 21 10:52:37 2006 UTC

Modified files: (Branch: SOC06)
/php-gcov-web/cron valgrind.php
Log:
remove left overs
fix hash colition of unicode/native tests

http://cvs.php.net/viewvc.cgi/php-g...0&diff_format=u
Index: php-gcov-web/cron/valgrind.php
diff -u php-gcov-web/cron/valgrind.php:1.1.2.9 php-gcov-web/cron/valgrind.php:1.1.2.10
--- php-gcov-web/cron/valgrind.php:1.1.2.9 Mon Sep 11 15:34:18 2006
+++ php-gcov-web/cron/valgrind.php Sat Oct 21 10:52:37 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/

-/* $Id: valgrind.php,v 1.1.2.9 2006/09/11 15:34:18 nlopess Exp $ */
+/* $Id: valgrind.php,v 1.1.2.10 2006/10/21 10:52:37 nlopess Exp $ */

// File to process memory leaks detected by valgrind

@@ -28,8 +28,7 @@
exit;
}

-// data: contains the contents of $tmpdir/php_test.log
-// unicode: true if unicode is included in the log files
+// $data: contains the contents of $tmpdir/php_test.log

// Output for core file
$index_write = '';
@@ -63,29 +62,19 @@

$base = "$phpdir/".substr($test['file'],0,-4);

- $dir = dirname($test['file']);
- $file = basename($test['file']);
- $hash = 'v' . md5($report_file);
-
- $report_file = ''; // Used internally to determine unicode or native filename
-
- $testtype = '';
+ $dir = dirname($test['file']);
+ $file = basename($test['file']);
$title = $test['title'];

- // If test mode is not unicode it is native
- if((isset($test['testtype'])) && (strtolower($test['testtype']) == 'u'))
- {
+ if(isset($test['testtype']) && strtolower($test['testtype']) == 'u') {
$testtype = 'Unicode';
-
- // This ensure the hash for unicode differs from the native leak
$report_file = $base.'u.mem';
- }
- else
- {
+ } else {
$testtype = 'Native';
-
$report_file = $base.'mem';
- } // End check for test type
+ }
+
+ $hash = 'v' . md5($report_file);

// Check if master server
if($is_master)
@@ -118,28 +107,8 @@

} // End check for master server

- $script_text = file_get_contents($base.'php');
-
- if($script_text === false)
- {
- $script_text = 'Script contents were not available.';
- $script_php = $script_text;
- }
- else
- {
- $script_php = highlight_string($script_text, true);
- } // End check for ability to obtain the script file contents
-
- $report = file_get_contents($report_file);
-
- if($report === false)
- {
- $report = 'Memory leak file contents were not available.';
- }
- else
- {
- $report = str_replace($phpdir,'',$report);
- } // End check for ability to obtain the contents of the mem file
+ $script_php = highlight_file($base.'php', true);
+ $report = str_replace($phpdir, '', file_get_contents($report_file));

if($is_master)
{
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com