From b7db8baa80168d23f8d14ce7fe57175bb0219547 Mon Sep 17 00:00:00 2001
From: david_williams <david_williams>
Date: Mon, 19 Feb 2007 01:54:04 +0000
Subject: [PATCH] fix for M5 builder

---
 .../distribution/wtp.site/build.xml           |   4 +-
 .../distribution/wtp.site/publish.xml         | 256 +++++++++++++-----
 .../wtp.site/staticDropFiles/report2.php      | 172 ++++++++++++
 .../templateFiles/compileResults.php.template |  41 +++
 .../templateFiles/index.html.N.template       | 154 -----------
 .../templateFiles/index.html.template         |  39 ++-
 .../testCompileResults.php.template           |  10 +-
 .../templateFiles/testResults.php.template    |  16 --
 8 files changed, 441 insertions(+), 251 deletions(-)
 create mode 100644 releng.wtpbuilder/distribution/wtp.site/staticDropFiles/report2.php
 create mode 100644 releng.wtpbuilder/distribution/wtp.site/templateFiles/compileResults.php.template
 delete mode 100644 releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.N.template

diff --git a/releng.wtpbuilder/distribution/wtp.site/build.xml b/releng.wtpbuilder/distribution/wtp.site/build.xml
index e1acb2b6e..2ab79b2bf 100644
--- a/releng.wtpbuilder/distribution/wtp.site/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/build.xml
@@ -1,4 +1,4 @@
-<project name="Build specific targets and properties" default="build">
+<project name="Build specific targets and properties" default="build" basedir=".">
 
     <!-- Note to be cross-platform, "environment variables" are only appropriate for
         some variables, e.g. ones we set, since properties are case sensitive, even if
@@ -23,6 +23,8 @@
             <jvmarg value="-Dbuild.distribution=${build.distribution}" />
             <jvmarg value="-DbuildDirectory=${buildDirectory}" />
             <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
+            <arg value="-data" />
+            <arg value="${basedir}/workspace" />
             <arg value="-application" />
             <arg value="org.eclipse.ant.core.antRunner" />
             <arg value="-buildfile" />
diff --git a/releng.wtpbuilder/distribution/wtp.site/publish.xml b/releng.wtpbuilder/distribution/wtp.site/publish.xml
index 94802b61d..6e811592d 100644
--- a/releng.wtpbuilder/distribution/wtp.site/publish.xml
+++ b/releng.wtpbuilder/distribution/wtp.site/publish.xml
@@ -6,20 +6,29 @@
         buildId:		Build name
         buildLabel:		<buildType>-<buildName>-<timestamp>
     -->
-    <property name="result"
+    
+    <property environment="env" />
+    
+    <property name="resultDir"
               value="${buildDirectory}/${buildLabel}" />
 
+    <echo message="resultDir: ${resultDir}" />
+    
+    <property name="templateDir" value="${wtp.builder.home}/distribution/wtp.site" />
+    
+    <echo message="templateDir: ${templateDir}" />
+    
     <!--name of generated index page-->
     <property name="indexFileName" value="index.php" />
 
     <target name="default">
         <antcall target="countFiles" />
-        <antcall target="generateIndex" />
+        <antcall target="generateCompileIndex" />
+        <antcall target="generateJUnitTestsIndex" />
         <antcall target="getStaticFiles" />
-        <antcall target="updateSite" />
     </target>
 
-    <target name="generateIndex">
+    <target name="generateCompileIndex" >
 
         <property name="class"
                   value="org.eclipse.releng.generators.TestResultsGenerator" />
@@ -42,47 +51,148 @@
         -->
         <property file="${buildDirectory}/maps/releng/maps/dependencies.properties" />
 
-        <!-- create table of test plugin compiles first -->
-        <!-- set isBuildTested to true for the "compile only" results -->
-        <indexResults isBuildTested="true"
+        <!-- create tables of test plugin compiles first -->
+        <indexResults isBuildTested="false"
                       dropTokenList="${dropTokenList}"
                       xmlDirectoryName=""
-                      dropDirectoryName="${result}"
-                      testResultsTemplateFileName="${basedir}/templateFiles/testCompileResults.php.template"
-                      dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
+                      dropDirectoryName="${resultDir}"
+                      testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template"
+                      dropTemplateFileName="${templateDir}/templateFiles/${indexTemplateFilename}"
                       testResultsHtmlFileName="testCompileResults.php"
                       dropHtmlFileName="${indexFileName}"
                       hrefTestResultsTargetPath=""
                       hrefCompileLogsTargetPath="testcompilelogs"
-                      compileLogsDirectoryName="${result}/testcompilelogs"
-                      testManifestFileName="${basedir}/testManifest.xml" />
+                      compileLogsDirectoryName="${resultDir}/testcompilelogs"
+                      testManifestFileName="${templateDir}/testManifest.xml" />
 
-        <!-- create table of code plugins compiles and test results second -->
-        <indexResults isBuildTested="${isBuildTested}"
+        <!-- create table of code plugins compiles -->
+        <indexResults isBuildTested="false"
                       dropTokenList="${dropTokenList}"
-                      xmlDirectoryName="${result}/testResults/xml"
-                      dropDirectoryName="${result}"
-                      testResultsTemplateFileName="${basedir}/templateFiles/testResults.php.template"
-                      dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
-                      testResultsHtmlFileName="testResults.php"
+                      xmlDirectoryName=""
+                      dropDirectoryName="${resultDir}"
+                      testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template"
+                      dropTemplateFileName="${templateDir}/templateFiles/${indexTemplateFilename}"
+                      testResultsHtmlFileName="compileResults.php"
                       dropHtmlFileName="${indexFileName}"
                       hrefTestResultsTargetPath="testResults/html"
                       hrefCompileLogsTargetPath="compilelogs"
-                      compileLogsDirectoryName="${result}/compilelogs"
-                      testManifestFileName="${basedir}/testManifest.xml" />
+                      compileLogsDirectoryName="${resultDir}/compilelogs"
+                      testManifestFileName="${templateDir}/testManifest.xml" />
+
+
+
+        <tstamp>
+            <format property="TODAY"
+                    pattern="MMMM d, yyyy" />
+        </tstamp>
+
+        <!--  Insert Build Type descriptor  -->
+        <antcall target="${buildType}" />
+
+        <!--  Insert Build Date  -->
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@date@"
+                 value="${TODAY}" />
+
+        <!--  Insert Build Name  -->
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@build@"
+                 value="${buildLabel}" />
+
+        <!--  Insert Mirror  Name  -->
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@mirror@"
+                 value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" />
+
+        <!--  Insert PreRequsites  -->
+
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@eclipseFile@"
+                 value="${eclipse.file.linux-gtk-x86}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@eclipseURL@"
+                 value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@eclipseBuildURL@"
+                 value="${eclipse.url}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@emfFile@"
+                 value="${emf.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@emfURL@"
+                 value="${emf.url}/${emf.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@gefFile@"
+                 value="${gef.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@gefURL@"
+                 value="${gef.url}/${gef.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@jemFile@"
+                 value="${jem.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@jemURL@"
+                 value="${jem.url}/${jem.file}" />
+        <!-- 
+	   these token/s should not exist in maintenance stream, but 
+	   no harm done, so in the interests of keeping builder 
+	   streams in sync, we'll leave them here as place hold
+-->
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@dtpFile@"
+                 value="${dtp.file}" />
+        <replace file="${resultDir}/${indexFileName}"
+                 token="@dtpURL@"
+                 value="${dtp.url}/${dtp.file}" />
 
-        <indexResults isBuildTested="${isBuildTested}"
+        <mkdir dir="${resultDir}/whatisfixed" />
+        <echo file="${resultDir}/whatisfixed/buglog.html"
+              append="true">
+            what is fixed list is not available yet!
+        </echo>
+
+        <!--  Update timestamp on file to permit overwrite through Ant copy task  -->
+        <touch file="${resultDir}/${indexFileName}" />
+    </target>
+    
+    <target name="generateJUnitTestsIndex" depends="checkIfTested" if="doTests">
+
+        <property name="class"
+                  value="org.eclipse.releng.generators.TestResultsGenerator" />
+        <taskdef name="indexResults" classname="${class}" />
+
+        <!--
+            isBuildTested:  true|false  should JUnit plugin test results be used to generate index page
+            dropTokenList:  comma separated list of strings which should be replaced by the fileName attribute settings in the testManifest.xml.
+            xmlDirectoryName:  path to directory containing JUnit plugin test results in xml format (see doc is org.eclipse.test).
+            dropDirectoryName: path to directory containing the result of the build.
+            testResultsTemplateFileName:  path to template file used to generate page with links to JUnit test results	
+            testResultsHtmlFileName:  name of file which will be generated with links to JUnit test results
+            dropHtmlFileName:  name of generated index page
+            hrefTestResultsTargetPath:  relative path from index page to directory containing JUnit html test results
+            hrefCompileLogsTargetPath:  relative path from index page directory containing compilelogs
+            testManifestFileName:	name of xml file containing descriptions of zip types and log files
+            
+            
+            
+        -->
+        <property file="${buildDirectory}/maps/releng/maps/dependencies.properties" />
+
+        <!-- create table of test plugin compiles first -->
+        <!-- set isBuildTested to true for the "compile only" results -->
+
+        <indexResults isBuildTested="true"
                       dropTokenList="${dropTokenList}"
-                      xmlDirectoryName=""
-                      dropDirectoryName="${result}"
-                      testResultsTemplateFileName="${basedir}/templateFiles/testCompileResults.php.template"
-                      dropTemplateFileName="${basedir}/templateFiles/${indexTemplateFilename}"
-                      testResultsHtmlFileName="testCompileResults.php"
+                      dropDirectoryName="${resultDir}"
+            		  xmlDirectoryName="${resultDir}/testResults/xml"
+                      testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template"
+                      dropTemplateFileName="${templateDir}/templateFiles/${indexTemplateFilename}"
+                      testResultsHtmlFileName="testResults.php"
                       dropHtmlFileName="${indexFileName}"
-                      hrefTestResultsTargetPath=""
-                      hrefCompileLogsTargetPath="testcompilelogs"
-                      compileLogsDirectoryName="${result}/testcompilelogs"
-                      testManifestFileName="${basedir}/testManifest.xml" />
+                      hrefTestResultsTargetPath="testResults/html"
+                      compileLogsDirectoryName=""
+                      testManifestFileName="${templateDir}/testManifest.xml" />
+        
 
         <tstamp>
             <format property="TODAY"
@@ -93,47 +203,47 @@
         <antcall target="${buildType}" />
 
         <!--  Insert Build Date  -->
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@date@"
                  value="${TODAY}" />
 
         <!--  Insert Build Name  -->
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@build@"
                  value="${buildLabel}" />
 
         <!--  Insert Mirror  Name  -->
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@mirror@"
                  value="${webtoolsDownloadURL}/${buildBranch}/${buildLabel}/" />
 
         <!--  Insert PreRequsites  -->
 
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@eclipseFile@"
                  value="${eclipse.file.linux-gtk-x86}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@eclipseURL@"
                  value="${eclipse.url}/${eclipse.file.linux-gtk-x86}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@eclipseBuildURL@"
                  value="${eclipse.url}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@emfFile@"
                  value="${emf.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@emfURL@"
                  value="${emf.url}/${emf.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@gefFile@"
                  value="${gef.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@gefURL@"
                  value="${gef.url}/${gef.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@jemFile@"
                  value="${jem.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@jemURL@"
                  value="${jem.url}/${jem.file}" />
         <!-- 
@@ -141,33 +251,33 @@
 	   no harm done, so in the interests of keeping builder 
 	   streams in sync, we'll leave them here as place hold
 -->
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@dtpFile@"
                  value="${dtp.file}" />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@dtpURL@"
                  value="${dtp.url}/${dtp.file}" />
 
-        <mkdir dir="${result}/whatisfixed" />
-        <echo file="${result}/whatisfixed/buglog.html"
+        <mkdir dir="${resultDir}/whatisfixed" />
+        <echo file="${resultDir}/whatisfixed/buglog.html"
               append="true">
             what is fixed list is not available yet!
         </echo>
 
         <!--  Update timestamp on file to permit overwrite through Ant copy task  -->
-        <touch file="${result}/${indexFileName}" />
+        <touch file="${resultDir}/${indexFileName}" />
     </target>
 
 
     <target name="getStaticFiles">
         <!--get static files required in the buildLabel directory-->
-        <copy todir="${result}">
-            <fileset dir="${basedir}/staticDropFiles" />
+        <copy todir="${resultDir}">
+            <fileset dir="${templateDir}/staticDropFiles" />
         </copy>
 
         <!--copy buildnotes from plugin directories-->
-        <mkdir dir="${result}/buildnotes" />
-        <copy todir="${result}/buildnotes" flatten="true">
+        <mkdir dir="${resultDir}/buildnotes" />
+        <copy todir="${resultDir}/buildnotes" flatten="true">
             <fileset dir="${buildDirectory}/plugins"
                      includes="**/buildnotes_*.html" />
         </copy>
@@ -211,7 +321,7 @@
             Added remove .zip.MD5 - old files before a count
         -->
         <delete>
-            <fileset dir="${result}" id="id">
+            <fileset dir="${resultDir}" id="id">
                 <include name="*.MD5" />
             </fileset>
         </delete>
@@ -219,66 +329,78 @@
         <taskdef name="countFiles"
                  classname="org.eclipse.releng.generators.FileCounter" />
 
-        <countFiles sourceDirectory="${result}"
+        <countFiles sourceDirectory="${resultDir}"
                     filterString=".zip,.tar.gz"
-                    outputFile="${result}/files.count" />
+                    outputFile="${resultDir}/files.count" />
 
     </target>
 
     <!--Build type descriptors-->
     <target name="I">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Integration" />
     </target>
 
     <target name="S">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Stable" />
     </target>
 
     <target name="N">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Nightly" />
     </target>
 
     <target name="M">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Maintenance" />
     </target>
 
     <target name="R">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Release" />
     </target>
 
 
     <target name="T">
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="%wtpandprereqs%"
                  value=" " />
-        <replace file="${result}/${indexFileName}"
+        <replace file="${resultDir}/${indexFileName}"
                  token="@type@"
                  value="Test" />
     </target>
+    
+    
+    <target name="checkIfTested">
+        <echo message="isBuildTested: ${isBuildTested}" />
+        <condition property="doTests">
+            <equals arg1="${isBuildTested}"
+                    arg2="true"
+                    trim="true"
+                    casesensitive="false" />
+        </condition>
+    </target>
+    
 
 </project>
\ No newline at end of file
diff --git a/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/report2.php b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/report2.php
new file mode 100644
index 000000000..e6d2a75d2
--- /dev/null
+++ b/releng.wtpbuilder/distribution/wtp.site/staticDropFiles/report2.php
@@ -0,0 +1,172 @@
+
+	<?php
+function count_pattern($directory, $filenameFilter, $pattern)
+{
+	$count = 0;
+	$dir = dir($directory);
+	while ($anEntry = $dir->read())
+	{
+		if ($anEntry != "." && $anEntry != "..")
+		{
+			$anEntry = $directory."/".$anEntry;
+			if (is_dir($anEntry))
+			{
+				$count += count_pattern($anEntry, $filenameFilter, $pattern);
+			}
+			else
+			{
+				if (stristr($anEntry, $filenameFilter))
+				{
+
+					$handle = @fopen($anEntry, "r");
+					if (FALSE !== $handle) {
+						$size = filesize($anEntry);
+						$content = fread($handle, $size);
+						fclose($handle);
+						$count += substr_count($content, $pattern);
+					}
+				}
+			}
+		}
+	}
+	return $count;
+}
+
+function parse_testResults($filename)
+{
+	$junitFailures = 0;
+	if (is_file($filename)) {
+		$handle = @fopen($filename, "r");
+		if ($handle)
+		{
+			$size = filesize($filename);
+			$content = fread($handle, $size);
+			fclose($handle);
+			$junitStart = strpos($content, "Errors &amp; Failures");
+			$junitEnd = strpos($content, "</table>", $junitStart);
+			$junitInfo = substr($content, $junitStart, $junitEnd - $junitStart);
+			$start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">");
+			while ($start !== false)
+			{
+				$start += 29;
+				$stop = strpos($junitInfo, "</font></b></td>", $start);
+				if ($stop !== false)
+				{
+					$result = substr($junitInfo, $start, $stop - $start);
+					if (is_numeric($result))
+					{
+						$junitFailures += $result;
+					}
+					else if (strcmp($result, "DNF") == 0)
+					{
+						$junitFailures++;
+					}
+				}
+				$start = strpos($junitInfo, "<td><b><font color=\"#ff0000\">", $stop);
+			}
+			$results = array($junitFailures);
+			return $results;
+		}
+	}
+}
+function parse_compileResults($filename)
+{
+	$compileErrors = 0;
+	$compileWarnings = 0;
+	if (is_file($filename)) {
+		$handle = @fopen($filename, "r");
+		if ($handle)
+		{
+			$size = filesize($filename);
+			$content = fread($handle, $size);
+			fclose($handle);
+
+
+			$compileStart = strpos($content, "Compile Logs (Jar Files)");
+			$compileEnd = strpos($content, "</table>", $compileStart);
+			$compileInfo = substr($content, $compileStart, $compileEnd - $compileStart);
+			$rowStart = strpos($compileInfo, "<tr>");
+			$start = $rowStart+4;
+			while ($rowStart !== false)
+			{
+
+				$start += 4;
+				$rowStop = strpos($compileInfo, "</tr>", $rowStart);
+				if ($rowStop !== false)
+				{
+					$row = substr($compileInfo, $rowStart, $rowStop - $rowStart);
+					$cellStart = strpos($row, "#ERROR");
+					$gotError = false;
+					$gotWarning = false;
+					while ($cellStart !== false && (!$gotError || !$gotWarning))
+					{
+						// this parsing logic got a bit more complicated in M2_33 basebuild, as the
+						// tag <td align="center"> was used, instead of <td>
+						// $cellStart += 4;
+						$cellStart = strpos($row, ">", $cellStart);
+						$cellStart = $cellStart + 1;
+						$cellStop = strpos($row, "<", $cellStart);
+						if ($cellStop !== false)
+						{
+							$cell = substr($row, $cellStart, $cellStop - $cellStart);
+							if (is_numeric($cell))
+							{
+								if (!$gotError)
+								{
+									$compileErrors += $cell;
+									$gotError = true;
+								}
+								else if (!$gotWarning)
+								{
+									$compileWarnings += $cell;
+									$gotWarning = true;
+								}
+							}
+						}
+						// this parsing logic got a bit more complicated in M2_33 basebuild, as the
+						// tag <td align="center"> was used, instead of <td>
+						$cellStart = strpos($row, "<tr", $cellStop);
+					}
+				}
+				$rowStart = strpos($compileInfo, "<tr>", $rowStop);
+			}
+		}
+	}
+
+	$results = array($compileErrors, $compileWarnings);
+	return $results;
+}
+
+
+function parse($filename, $key)
+{
+	if (!is_readable($filename))
+	{
+		return 0;
+	}
+	$value;
+	$handle = @fopen($filename, "r");
+	if (!$handle)
+	{
+		return 0;
+	}
+	$size = filesize($filename);
+	$content = fread($handle, $size);
+	fclose($handle);
+	$start = strpos($content, $key);
+	while ($start !== false)
+	{
+		$start += strlen($key);
+		$stop = strpos($content, "\"", $start);
+		if ($stop !== false)
+		{
+			$value += substr($content, $start, $stop - $start);
+		}
+		$start = strpos($content, $key, $stop);
+	}
+	return $value;
+}
+
+?>
+
+
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/compileResults.php.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/compileResults.php.template
new file mode 100644
index 000000000..2bb34e088
--- /dev/null
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/compileResults.php.template
@@ -0,0 +1,41 @@
+<html>
+<head>
+
+<?php
+	$parts = explode("/", getcwd());
+	$parts2 = explode("-", $parts[count($parts) - 1]);
+	$buildName = $parts2[1];
+	
+	echo "<title>Test Results for $buildName </title>";
+?>
+
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css">
+</head>
+<body>
+
+<p><b><font face="Verdana" size="+3">Code Compile Results</font></b> </p>
+
+
+
+<table border=0 cellspacing=5 cellpadding=2 width="100%" >
+  <tr> 
+    <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Code Bundles</font></b></td>
+  </tr>
+</table>
+
+<table id=tabledata width="77%" border="1">
+  <tr> 
+    <td><b>Compile Logs (Jar Files)</b></td>
+   
+    <td><b>Compile Errors</b></td>
+    <td><b>Access Violations</b></td>
+    <td><b>Compiler Warnings</b></td>
+  </tr>
+  
+  %compilelogs%
+  
+</table>
+
+</body>
+</html>
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.N.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.N.template
deleted file mode 100644
index 9b584bc08..000000000
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.N.template
+++ /dev/null
@@ -1,154 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<link rel="stylesheet" href="http://dev.eclipse.org/default_style.css" type="text/css">
-<title>Download</title>
-</head>
-
-<body>
-
-<?php
-include '../../report.php';
-$testResults = parse_testResult("testResults.php");
-list ($compileErrors, $compileWarnings, $junitFailures) = $testResults;
-$violations = parse("apitools/index.xml", "count=\"");
-$tc = parse("apitools/index-api-tc.xml", "missing-coverage-count=\"");
-$removed_apis = parse("apitools/index-api-compatibility.xml", "removed-api-count=\"");
-?>
-
-&nbsp; <table BORDER=0 CELLSPACING=5 CELLPADDING=2 WIDTH="100%" ><tr><td ALIGN=LEFT width="80%"> 
-<p><b><font face="Verdana" size="+3">@type@ Build: @build@</font></b><br>
-@date@ 
-</p>
-<p>These downloads are provided under the <a href="http://www.eclipse.org/legal/epl/notice.html">Eclipse Foundation 
-Software User Agreement</a>.</p>
-</td></tr></table>
-
-<!-- ***********  Build Status **************  -->
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"> <b><font face="Arial,Helvetica" color="#FFFFFF">Build, test and performance</font></b></td></tr></table>
-<br>
-<?
-include '../../displayBuildMachine.php';
-echo displayBuildMachine();
-?>
-<br> <a href="buildNotes.php">Build notes</a>
-<br> <a href="directory.txt">map files</a>
-<br> <a href="testResults.php">Compile logs &amp; test results</a>
-
-<?php
-echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_err.gif\"/><font color=red>$compileErrors</font>&nbsp;";
-echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$compileWarnings</font>&nbsp;";
-echo "<img src=\"http://download.eclipse.org/webtools/downloads/junit_err.gif\"/><font color=red>$junitFailures</font>";
-?>
-
-<br> <a href="whatisfixed/buglog.html">What is fixed</a>
-
-<!--
-<br> <a href="perf/results/graph/global.php">Performance results</a>
--->
-<br> <a href="pii.php">Unused property messages</a>
-<!-- To view cvs changes since the last build click  <A href="rloghtml/rlog.html">here</A>.<BR> -->
-<p/>
-
-<?php
-if (file_exists("./apiresults"))
-{
-  echo "<br>";
-  echo "<br> <a href=\"apiresults/api-progress.html\">API Progress Report</a>";
-  echo "<br> <a href=\"apiresults/api-info-summary.html\">APIs Defined by Each Component</a>";
-  echo "<br> <a href=\"apiresults/api-ref-compatibility.html\">Adopter Breakage Report</a>";
-  echo "<br> <a href=\"apiresults/api-violation-summary.html\">API Violations</a>";
-  echo "<br> <a href=\"apiresults/component-api-violation-all.html\">Non-API dependencies</a>";
-  echo "<br> <a href=\"apiresults/api-tc-summary.html\">API Test Coverage</a>";
-  echo "<br> <a href=\"apiresults/api-javadoc-summary.html\">API Javadoc Coverage</a>";
-
-  echo "<br><br> <a href=\"apiresults/full_test_coverage/api-tc-summary.html\">Test Coverage for All Classes and Methods</a>";
-} 
-?>
-
-<?php
-if (file_exists("./perfresults"))
-{
-  echo "<br>";
-  echo "<br> <a href=\"perfresults/graph/performance.php\">Performance Results</a>";
-  echo "<br>";
-}
-?>
-
-<!-- ***********  Requirements **************  -->
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"> <b><font face="Arial,Helvetica" color="#FFFFFF">Requirements</font></b></td></tr></table>
-<P>These are the prerequisites to install WebTools Platform;. They must 
-be downloaded and installed before the WTP can be installed.</P><br>
-<li>The Eclipse driver used in this build is <a href="@eclipseURL@">@eclipseFile@</a>. You can find a suitable driver for your platform at <a href=@eclipseBuildURL@>here</a><br></li>
-<li>The EMF driver used in this build is <a href="@emfURL@">@emfFile@</a><br></li>
-<li>The GEF driver used in this build is <a href="@gefURL@">@gefFile@</a><br></li>
-<li>Java EMF Model Runtime driver used in this build is <a href="@jemURL@">@jemFile@</a><br></li>
-<P></P>
-
-
-
-<!-- ***********  Runtime downloads **************  -->
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0">
-<b><font face="Arial,Helvetica" color="#FFFFFF">
-WebTools Platform; Runtime
-</font></b></td></tr>
-
-<TR><TD align="LEFT" valign="TOP" colspan="3">
-The Eclipse Web Tools Platform Project will initially focus on infrastructure for tools used to build applications for standards-based Web and Java runtime environments. 
-WTP Runtime module includes the WST and JST builds in one package.
-</TD></TR></table>
-
-%wtpandprereqs%
-
-<table border=0 cellspacing=2 cellpadding=0 width="100%" bordercolor="#999999" >
-<tr><td align=RIGHT valign=TOP width="7%">
-<div align="left"><b>Status</b></div></td>
-<td width="34%"><b>Platform</b></td>
-<td width="59%"><b>Download</b></td></tr>
-%wtpruntime% 
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2">&nbsp;</td></tr></table>
-
-<table border=0 cellspacing=2 cellpadding=0 width="100%" bordercolor="#999999" >
-<tr><td align=RIGHT valign=TOP width="7%">
-<div align="left"><b>Status</b></div></td>
-<td width="34%"><b>Platform</b></td>
-<td width="59%"><b>Download</b></td></tr>
-%wtpsdk% 
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2">&nbsp;</td></tr></table>
-
-
-
-<!-- ***********  Automated Test Downloads **************  -->
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td align=LEFT valign=TOP colspan="3" bgcolor="#999999">
-<b><font face="Arial,Helvetica" color="#FFFFFF">
-Automated Tests
-</font></b></td></tr>
-
-<TR><TD align="LEFT" valign="TOP" colspan="3">
-This download contains the JUnit tests for the WST and JST Projects
-</TD></TR></table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2">&nbsp;</td></tr></table>
-
-<table BORDER=0 CELLSPACING=2 CELLPADDING=0 WIDTH="100%" bordercolor="#999999" > 
-<tr><td align=RIGHT valign=TOP width="7%">
-<div align="left"><b>Status</b></div></td>
-<td width="34%"><b>Platform</b></td>
-<td width="59%"><b>Download</b></td></tr>
-<tr><td>%wst-tests%</td></tr>
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2">&nbsp;</td></tr></table>
-
-<table BORDER=0 CELLSPACING=2 CELLPADDING=0 WIDTH="100%" bordercolor="#999999" > 
-<tr><td align=RIGHT valign=TOP width="7%">
-<div align="left"><b>Status</b></div></td>
-<td width="34%"><b>Platform</b></td>
-<td width="59%"><b>Download</b></td></tr>
-<tr><td>%jst-tests%</td></tr>
-</table>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" ><tr><td colspan="2">&nbsp;</td></tr></table>
-
-
-</body>
-</html>
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template
index 2d708b0e9..d2a12a50a 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/index.html.template
@@ -7,12 +7,21 @@
 
 <body>
 
-<?php
-include '../../../report.php';
-$testResults = parse_testResult("testResults.php");
-list ($compileErrors, $compileWarnings, $junitFailures) = $testResults;
+
+<?php 
+//ini_set("display_errors", "true");  
+//error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE );
+
+include 'report2.php';
+$testResults = parse_testResults("testResults.php");
+list ($junitFailures) = $testResults;
+$compileResults = parse_compileResults("compileResults.php");
+list ($compileErrors, $compileAccessWarnings, $compileOtherWarnings) = $compileResults;
+$testCompileResults = parse_compileResults("testCompileResults.php");
+list ($testCompileErrors, $testCompileAccessWarnings, $testCompileOtherWarnings) = $testCompileResults;
 ?>
 
+
 &nbsp; <table BORDER=0 CELLSPACING=5 CELLPADDING=2 WIDTH="100%" ><tr><td ALIGN=LEFT width="80%">
 <p><b><font face="Verdana" size="+3">@type@ Build: @build@</font></b><br>
 @date@
@@ -34,17 +43,31 @@ if (file_exists($buildmachineScript))
 ?>
 <br> <a href="buildNotes.php">Build notes</a>
 <br> <a href="directory.txt">map files</a>
+<br>
+<br>
+<br> <a href="testResults.php">Unit test results</a>
+<?php
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/junit_err.gif\"/><font color=red>$junitFailures</font>";
+?>
 
-<br> <a href="testResults.php">Compile logs &amp; test results</a>
+
+<br> <a href="compileResults.php">Code Bundles Compile logs</a>
 <?php
 echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_err.gif\"/><font color=red>$compileErrors</font>&nbsp;";
-echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$compileWarnings</font>&nbsp;";
-echo "<img src=\"http://download.eclipse.org/webtools/downloads/junit_err.gif\"/><font color=red>$junitFailures</font>";
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$compileAccessWarnings</font>&nbsp;";
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$compileOtherWarnings</font>&nbsp;";
 ?>
 
 <br> <a href="testCompileResults.php">Test Bundles Compile logs</a>
-<br> <a href="whatisfixed/buglog.html">What is fixed</a>
+<?php
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_err.gif\"/><font color=red>$testCompileErrors</font>&nbsp;";
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$testCompileAccessWarnings</font>&nbsp;";
+echo "<img src=\"http://download.eclipse.org/webtools/downloads/compile_warn.gif\"/><font color=orange>$testCompileOtherWarnings</font>&nbsp;";
+?>
+<br>
+<br>
 
+<br> <a href="whatisfixed/buglog.html">What is fixed</a>
 <br> <a href="pii.php">Unused property messages</a>
 
 <?php
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/testCompileResults.php.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/testCompileResults.php.template
index 058681949..a6239b737 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/testCompileResults.php.template
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/testCompileResults.php.template
@@ -18,16 +18,16 @@
 
 <table border=0 cellspacing=5 cellpadding=2 width="100%" >
   <tr> 
-    <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Test Plugins 
-      containing compile errors or warnings </font></b></td>
+    <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Test Bundles</font></b></td>
   </tr>
 </table>
 
-<table width="77%" border="1">
+<table id=tabledata width="77%" border="1">
   <tr> 
     <td><b>Compile Logs (Jar Files)</b></td>
-    <td><b>Errors</b></td>
-	<td><b>Warnings</b></td>
+    <td><b>Compile Errors</b></td>
+    <td><b>Access Violations</b></td>
+    <td><b>Compiler Warnings</b></td>
   </tr>
   
   %compilelogs%
diff --git a/releng.wtpbuilder/distribution/wtp.site/templateFiles/testResults.php.template b/releng.wtpbuilder/distribution/wtp.site/templateFiles/testResults.php.template
index 6fcd9fbb0..f339ea6ea 100644
--- a/releng.wtpbuilder/distribution/wtp.site/templateFiles/testResults.php.template
+++ b/releng.wtpbuilder/distribution/wtp.site/templateFiles/testResults.php.template
@@ -69,23 +69,7 @@ while ($anEntry = $dir->read())
 These <a href="consoleLogs.php">logs</a> contain the console output captured while 
 running the JUnit automated tests. <br>
 <br>
-<table border=0 cellspacing=5 cellpadding=2 width="100%" >
-  <tr> 
-    <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Plugins 
-      containing compile errors </font></b></td>
-  </tr>
-</table>
 
-<table width="77%" border="1">
-  <tr> 
-    <td><b>Compile Logs (Jar Files)</b></td>
-    <td><b>Errors</b></td>
-	<td><b>Warnings</b></td>
-  </tr>
-  
-  %compilelogs%
-  
-</table>
 
 </body>
 </html>
-- 
GitLab