Commit: 4c2bf7adcbb9da39da89a4d407ddbe944b774ba4 Author: v-maf...@microsoft.com <v-maf...@microsoft.com> Sun, 6 Apr 2014 20:45:37 -0700 Parents: 0ffb31aa196d8dad547557a71b92ae267225719b Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=4c2bf7adcbb9da39da89a4d407ddbe944b774ba4 Log: Color coding list of branches/builds Changed paths: M build.php M list_builds.php M pftt.php M pftt_report.php Diff: diff --git a/build.php b/build.php index 89381b3..69d1b6c 100755 --- a/build.php +++ b/build.php @@ -49,8 +49,10 @@ foreach ( scandir(BASE_REPORT_DIR."/$branch/$revision") as $report ) { if (substr($report_name, strlen($report_name)-5, 5)==".html") $report_name = substr($report_name, 0, strlen($report_name)-5); + $has_fails_crashes = is_file("$report_name.txt"); + ?> - <tr> + <tr<?php if ($has_fails_crashes) { echo ' style="background:#ff0000"'; } ?>> <td>with <a href="/reports/db/<?php echo $branch; ?>/<?php echo $revision; ?>/<?php echo $report; ?>" target="_blank"><?php echo $report_name; ?></a></td> </tr> <?php diff --git a/list_builds.php b/list_builds.php index 95eec34..8699e4b 100755 --- a/list_builds.php +++ b/list_builds.php @@ -44,20 +44,18 @@ foreach ( $r as $revision ) { } } // end foreach +$red = is_file(BASE_REPORT_DIR."/$branch/$latest_revision/FAIL_CRASH.txt"); + ?> -<table> +<table style="background:<?php echo $red ? '#ff0000' : '#ccff66'; ?>"> <tr> <td>Latest:</td> <td><a href="build.php?branch=<?php echo $branch; ?>&revision=<?php echo $latest_revision; ?>"><?php echo $latest_revision; ?></a></td> </tr> -<?php /*<tr> - <td>New Failures:</td> - <td>New Crashes:</td> - </tr>*/ ?> </table> <br/> -<table> +<table style="background:<?php echo $red ? '#ff0000' : '#ccff66'; ?>"> <?php foreach ( scandir(BASE_REPORT_DIR."/$branch") as $revision ) { @@ -78,6 +76,8 @@ foreach ( scandir(BASE_REPORT_DIR."/$branch") as $revision ) { ?> </table> +<br/> +<br/> <?php } // end if diff --git a/pftt.php b/pftt.php index a6437ab..bee58a9 100755 --- a/pftt.php +++ b/pftt.php @@ -37,11 +37,13 @@ if ($branches!==FALSE) { } } } + + $red = is_file(BASE_REPORT_DIR."/$branch/$latest_revision/FAIL_CRASH.txt"); ?> -<table> +<table style="background:<?php echo $red ? '#ff0000;' : '#ccff66'; ?>"> <tr> - <td colspan="2"><a href="list_builds.php?branch=<?php echo $branch; ?>"><?php echo $branch; ?></a></td> + <td style="width:300px"><a href="list_builds.php?branch=<?php echo $branch; ?>"><?php echo $branch; ?></a></td> <td>Latest:</td> <td><a href="build.php?branch=<?php echo $branch; ?>&revision=<?php echo $latest_revision; ?>"><?php echo $latest_revision; ?></a></td> </tr> @@ -59,6 +61,8 @@ if ($branches!==FALSE) { <p><strong>PFTT Binaries:</strong> <a href="http://windows.php.net/downloads/snaps/ostc/pftt/" target="_blank">http://windows.php.net/downloads/snaps/ostc/pftt/</a></p> +<br/> +<br/> <?php common_footer(); diff --git a/pftt_report.php b/pftt_report.php index 96ad1cf..79ac1de 100755 --- a/pftt_report.php +++ b/pftt_report.php @@ -41,6 +41,7 @@ if (md5($_POST['token'])!="b1cab611a6a4ae40693c0f0f9df16692") { $branch = strtoupper($_POST['branch']); $revision = strtolower($_POST['revision']); +$fail_crash_count = $_POST['fail_crash_count']; // do a bunch of validation on the input switch($branch) { @@ -101,6 +102,15 @@ $report_dir = dirname($report_file); // ensure dir exists mkdir($report_dir, 0777, TRUE); +if ($fail_crash_count > 0) { + $fh = fopen("$report_dir/FAIL_CRASH.txt", "w"); + fwrite($fh, "$fail_crash_count"); + fclose($fh); + $fh = fopen("$$report_name.txt", "w"); + fwrite($fh, "$fail_crash_count"); + fclose($fh); +} + // report_file is stored locally in a temporary file, move that file to the permanent location move_uploaded_file($_FILES['report_file']['tmp_name'], $report_file); -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php