Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Williams2014-08-04 22:19:29 -0400
committerDavid Williams2014-08-04 22:19:29 -0400
commitc42789de1ad85f5d46e3f181e6a1ef75a6e209f9 (patch)
treec1de34d9db3d1804ab06d0a3f99098f8486d31a2
parent71df298d31d3e3989e95c8c295dadabab85aa69f (diff)
downloadeclipse.platform.releng.aggregator-c42789de1ad85f5d46e3f181e6a1ef75a6e209f9.tar.gz
eclipse.platform.releng.aggregator-c42789de1ad85f5d46e3f181e6a1ef75a6e209f9.tar.xz
eclipse.platform.releng.aggregator-c42789de1ad85f5d46e3f181e6a1ef75a6e209f9.zip
Bug 387066 - Remove Red X's (and the few green checkmarks) from main DL
page
-rw-r--r--eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/utilityFunctions.php43
1 files changed, 31 insertions, 12 deletions
diff --git a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/utilityFunctions.php b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/utilityFunctions.php
index 96f69708..16b1455d 100644
--- a/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/utilityFunctions.php
+++ b/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/staticDropFiles/utilityFunctions.php
@@ -52,8 +52,8 @@ directory.
function calcTestConfigsRan($testResultsDirName) {
- global $expectedtestConfigs;
- global $foundConfigs;
+ global $expectedTestConfigs;
+ global $testResults;
$boxes=0;
// the include file, testConfigs.php defines 'testConfigs' array,
@@ -67,14 +67,12 @@ function calcTestConfigsRan($testResultsDirName) {
if (file_exists("testConfigs.php")) {
include "testConfigs.php";
- $testConfigs = &$expectedTestConfigs;
}
else {
// minus 2 is code for "testConfigs not found"
$boxes=-2;
- $testConfigs = array();
+ $expectedTestConfigs = array();
}
- $expectedtestConfigs=count($testConfigs);
if (file_exists("buildproperties.php")) {
// be sure any previous are reset
@@ -99,10 +97,31 @@ function calcTestConfigsRan($testResultsDirName) {
if (file_exists("$testResultsDirName/consolelogs")) {
$buildDir = dir("$testResultsDirName/consolelogs");
while ($file = $buildDir->read()) {
- for ($i = 0 ; $i < $expectedtestConfigs ; $i++) {
- if (strncmp($file, $testConfigs[$i], count($testConfigs[$i])) == 0) {
+ for ($i = 0 ; $i < count($expectedTestConfigs) ; $i++) {
+ if (strncmp($file, $expectedTestConfigs[$i], count($expectedTestConfigs[$i])) == 0) {
$boxes++;
- $foundConfigs[] = $testConfigs[$i];
+ // our way of matching job names, with test configs, is very limited,
+ // at the moment ... just looking for three letter match between the two.
+ // First make sure we get "fresh" list of test summary files, each time.
+ $testResultsSummaryFiles = glob($testResultsDirName."/ep*-unit-*.xml");
+ //echo "DEBUG: found ".count($testResultsSummaryFiles). "summary files<br />";
+ //echo "DEBUG: while expected config was $expectedTestConfigs[$i]<br />";
+ // Then match the "test config" we found, with the test summary file.
+ if (strpos($expectedTestConfigs[$i], "lin") !== FALSE) {
+ // echo "DEBUG: found matching config: $expectedTestConfigs[$i]<br />";
+ foreach ($testResultsSummaryFiles as $summFileName) {
+ // echo "DEBUG: processing $summFileName<br />";
+ if (strpos($summFileName, "lin") !== FALSE) {
+ //echo "DEBUG: found matching summary file: $summFileName<br />";
+ $xmlResults = simplexml_load_file($summFileName);
+ $testResults[$expectedTestConfigs[$i]]["duration"]=$xmlResults->duration;
+ $testResults[$expectedTestConfigs[$i]]["failCount"]=$xmlResults->failCount;
+ $testResults[$expectedTestConfigs[$i]]["passCount"]=$xmlResults->passCount;
+ $testResults[$expectedTestConfigs[$i]]["skipCount"]=$xmlResults->skipCount;
+ }
+ }
+ }
+
break;
}
}
@@ -167,7 +186,7 @@ function printTestSummaryStatus() {
// don't forget to end link, after images decided.
if ($boxes > -1) {
- $boxesTitle=$boxes." of ".$expectedtestConfigs." test platforms finished.";
+ $boxesTitle=$boxes." of ".count($expectedTestConfigs)." test platforms finished.";
}
if ($testResultsDirName === "results") {
echo "<a href=\"results/testResults.html\" title=\"$boxesTitle\" style=\"text-decoration: none\">";
@@ -182,7 +201,7 @@ function printTestSummaryStatus() {
// assume if no results at all, after 12 hours, assume they didn't run for unknown reasosn
$testimage="caution.gif";
$testalt="Integration tests did not run, due to unknown reasons.";
- } elseif ($boxes > 0 && $boxes < $expectedtestConfigs) {
+ } elseif ($boxes > 0 && $boxes < count($expectedTestConfigs)) {
if ($diff > 1440) {
$testimage="junit.gif";
$testalt="Tests results are available but did not finish on all machines";
@@ -190,7 +209,7 @@ function printTestSummaryStatus() {
$testimage="runtests.gif";
$testalt="Integration tests are running ...";
}
- } elseif ($boxes == $expectedtestConfigs) {
+ } elseif ($boxes == count($expectedTestConfigs)) {
$testimage="junit.gif";
$testalt="Tests results are available";
} else {
@@ -199,7 +218,7 @@ function printTestSummaryStatus() {
}
echo "<img style=\"border:0px\" src=\"../images/$testimage\" title=\"$testalt\" alt=\"$testalt\" />";
if ($boxes > -1) {
- echo "&nbsp;(".$boxes." of ".$expectedtestConfigs." platforms)";
+ echo "&nbsp;(".$boxes." of ".count($expectedTestConfigs)." platforms)";
}
echo "</a>\n";
} else {

Back to the top