Skip to content
Snippets Groups Projects
Commit 170c7903 authored by tle's avatar tle
Browse files

First implementation for Dali 2.1 release

parent 8759456b
No related branches found
No related tags found
No related merge requests found
Showing
with 1085 additions and 386 deletions
<project <project
default="build" default="build"
basedir="."> basedir=".">
<fail
unless="wtp.builder.home" />
<property
file="${wtp.builder.home}/build.properties" />
<target <target
name="build" name="build"
depends="getBaseBuilder"> depends="getBaseBuilder">
<dirname <dirname
file="${ant.file}" file="${ant.file}"
property="distribution.wtp.build.dir" /> property="distribution.wtp.build.dir" />
<property file="${wtp.builder.home}/build.properties" />
<property <property
name="buildTargets" name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml" /> value="${wtp.builder.home}/scripts/build/runbuild.xml" />
<ant
<ant antfile="${buildTargets}"> antfile="${wtp.builder.home}/scripts/build/label.xml" />
<ant
antfile="${buildTargets}">
<property <property
name="component" name="component"
value="dali" /> value="dali" />
</ant> </ant>
<ant
antfile="${buildTargets}">
<ant antfile="${buildTargets}">
<property <property
name="component" name="component"
value="dali-sdk" /> value="dali-sdk" />
</ant> </ant>
<ant
<ant antfile="${buildTargets}"> antfile="${buildTargets}">
<property <property
name="component" name="component"
value="dali.tests" /> value="dali.tests" />
<property
name="eclipseBuildFailOnError"
value="false" />
</ant> </ant>
<antcall
<ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> target="package" />
</target> </target>
<target <target
name="getBaseBuilder" name="getBaseBuilder"
if="eclipse.builder.fetch"> if="eclipse.builder.fetch">
...@@ -45,10 +49,13 @@ ...@@ -45,10 +49,13 @@
<property <property
name="buildTargets" name="buildTargets"
value="${wtp.builder.home}/scripts/build/runbuild.xml" /> value="${wtp.builder.home}/scripts/build/runbuild.xml" />
<!-- delete dir="${pde.builder.path}" failonerror="false"/ -->
<ant <ant
antfile="${buildTargets}" antfile="${buildTargets}"
target="getBaseBuilder" /> target="getBaseBuilder" />
</target> </target>
<target
</project> name="package">
<!-- post, post packaging, for WTP ... "manually" assemble the desired zips -->
<!-- nothing to assemble right now -->
</target>
</project>
\ No newline at end of file
<project <project
name="Build specific targets and properties" name="Build specific targets and properties"
default="build"> default="build"
basedir=".">
<!-- Note to be cross-platform, "environment variables" are only appropriate for <!-- 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 some variables, e.g. ones we set, since properties are case sensitive, even if
the environment variables on your operating system are not, e.g. it will the environment variables on your operating system are not, e.g. it will
be ${env.Path} not ${env.PATH} on Windows --> be ${env.Path} not ${env.PATH} on Windows -->
<property environment="env" /> <property environment="env" />
<!--
Let users override standard properties, if desired.
If directory, file, or some properties do not exist,
then standard properties will be used.
-->
<property
file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" />
<!-- = = = end standard properties pattern = = = -->
<echo message="ant.file: ${ant.file}" />
<target name="build"> <target name="build">
<java <java
jar="${eclipse.launcher}" jar="${eclipse.launcher}"
...@@ -17,8 +27,8 @@ ...@@ -17,8 +27,8 @@
<jvmarg value="-Dosgi.ws=${env.BASEWS}" /> <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
<jvmarg value="-Dosgi.os=${env.BASEOS}" /> <jvmarg value="-Dosgi.os=${env.BASEOS}" />
<jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
<jvmarg value="-Dbuild.home=${build.home}" />
<jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}" /> <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}" />
<jvmarg value="-DbuildBranch=${buildBranch}" />
<jvmarg value="-DbuildType=${buildType}" /> <jvmarg value="-DbuildType=${buildType}" />
<jvmarg value="-DbuildId=${buildId}" /> <jvmarg value="-DbuildId=${buildId}" />
<jvmarg value="-DmapVersionTag=${mapVersionTag}" /> <jvmarg value="-DmapVersionTag=${mapVersionTag}" />
...@@ -27,7 +37,9 @@ ...@@ -27,7 +37,9 @@
<jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" />
<jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" /> <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" />
<jvmarg <jvmarg
value="-Dprojectname=${projectname}" /> value="-Dprojectname=${projectname}" />
<arg value="-data" />
<arg value="${basedir}/workspace" />
<arg value="-application" /> <arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" /> <arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" /> <arg value="-buildfile" />
...@@ -58,21 +70,17 @@ ...@@ -58,21 +70,17 @@
value="${buildDirectory}/${buildLabel}" /> value="${buildDirectory}/${buildLabel}" />
<property <property
name="indexTemplateFilename" name="indexTemplateFilename"
value="index.html.template" /> value="index.html.template.php" />
<copy
file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
tofile="${buildDirectory}/${indexFileName}" />
<condition <condition
property="isBuildTested" property="isBuildTested"
value="true"> value="true">
<available <available
file="${buildDirectory}/${buildLabel}/testResults/consolelogs/dalitestlog.txt" /> file="${buildDirectory}/${buildLabel}/testResults/html" />
</condition>
<condition
property="isBuildTested"
value="false">
<not>
<available
file="${buildDirectory}/${buildLabel}/testResults/consolelogs/dalitestlog.txt" />
</not>
</condition> </condition>
<ant <ant
...@@ -80,12 +88,14 @@ ...@@ -80,12 +88,14 @@
dir="${component.dir}"> dir="${component.dir}">
<property <property
name="dropTokenList" name="dropTokenList"
value="%dali-runtime%,%dali-tests%" /> value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%" />
<property <property
name="daliDownloadURL" name="webtoolsDownloadURL"
value="http://www.eclipse.org/downloads/download.php?file=/technology/dali/committers/drops" /> value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops" />
<property
name="buildBranch"
value="${buildBranch}" />
<property <property
name="isBuildTested" name="isBuildTested"
value="${isBuildTested}" /> value="${isBuildTested}" />
...@@ -104,6 +114,12 @@ ...@@ -104,6 +114,12 @@
file="${buildDirectory}/buildmachineinfo.properties" file="${buildDirectory}/buildmachineinfo.properties"
tofile="${result}/buildmachineinfo.properties" /> tofile="${result}/buildmachineinfo.properties" />
<!-- final count files -->
<countBuildFiles
sourceDirectory="${buildDirectory}/${buildLabel}"
filterString=".zip,.tar.gz"
outputFile="${buildDirectory}/${buildLabel}/files.count" />
</target> </target>
......
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="html"
indent="yes" />
<xsl:template match="/">
<html>
<body>
<xsl:apply-templates select="compiler" />
</body>
</html>
</xsl:template>
<xsl:template match="compiler">
<h2>Compiler Report</h2>
<p>
Compiler:
<xsl:value-of select="@name" />
<xsl:text> </xsl:text>
Version:
<xsl:value-of select="@version" />
</p>
<xsl:apply-templates select="stats" />
<xsl:apply-templates select="sources" />
</xsl:template>
<xsl:template
name="stats"
match="stats">
<p>
Number of source files:
<xsl:value-of select="count(..//source)" />
Number of classfiles:
<xsl:value-of select="number_of_classfiles/@value" />
</p>
<p>
Problems:
<xsl:value-of select="problem_summary/@problems" />
(Errors:
<xsl:value-of select="problem_summary/@errors" />
Warnings:
<xsl:value-of select="problem_summary/@warnings" />
)
</p>
</xsl:template>
<xsl:template
name="sources"
match="sources">
<xsl:if test="count(source) > 0">
<dl>
<xsl:for-each select="source">
<xsl:variable
name="package"
select="normalize-space(@package)">
</xsl:variable>
<xsl:variable
name="path"
select="normalize-space(@path)">
</xsl:variable>
<xsl:variable
name="classname"
select="substring-after($path, $package)">
</xsl:variable>
<xsl:if test="count(problems) > 0">
<dt style="font-weight: bold; color: black">
Source File:
<xsl:value-of select="$package" />
<xsl:value-of select="$classname" />
</dt>
<xsl:apply-templates select="problems">
<xsl:with-param name="classname">
<xsl:value-of select="$classname" />
</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:for-each>
</dl>
</xsl:if>
</xsl:template>
<xsl:template match="problems">
<xsl:param name="classname" />
<xsl:for-each select="problem">
<dd style="font-weight: normal; color: black">
<xsl:value-of select="position()" />
<xsl:text>. </xsl:text>
<xsl:value-of select="@severity" />
<xsl:text>: </xsl:text>
<xsl:value-of select="@id" />
<xsl:variable
name="lineNumber"
select="@line">
</xsl:variable>
<xsl:for-each select="message">
<p
style="margin-left: +.5in; font-size: -1; margin-top: 0;margin-bottom:0;">
<small>
<xsl:value-of select="@value" />
</small>
</p>
</xsl:for-each>
<xsl:for-each select="source_context">
<xsl:variable
name="pre"
select="substring(@value,0,(@sourceStart + 1))">
</xsl:variable>
<xsl:variable
name="main"
select="substring(@value,(@sourceStart + 1),(((@sourceEnd + 1) - (@sourceStart + 1)) + 1))">
</xsl:variable>
<xsl:variable
name="end"
select="substring(@value,(@sourceEnd + 2))">
</xsl:variable>
<p
style="margin-left: +.5in; font-size: -2; margin-top: 0;margin-bottom:0;">
<xsl:value-of select="substring($classname,2)" />
:
</p>
<p
style="margin-left: +.5in; font-size: -2;font-family: monospace; margin-top: 0;margin-bottom:0;">
<xsl:value-of select="$lineNumber" />
:
<xsl:value-of select="$pre" />
<b>
<u>
<xsl:value-of select="$main" />
</u>
</b>
<xsl:value-of select="$end" />
</p>
</xsl:for-each>
</dd>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
This diff is collapsed.
releng.wtpbuilder/distribution/dali.site/staticDropFiles/FAIL.gif

117 B

releng.wtpbuilder/distribution/dali.site/staticDropFiles/OK.gif

139 B

releng.wtpbuilder/distribution/dali.site/staticDropFiles/access_err.gif

906 B

releng.wtpbuilder/distribution/dali.site/staticDropFiles/access_warn.gif

146 B

<html> <html>
<head> <head>
<?php <?php
$parts = explode("/", getcwd()); $parts = explode("/", getcwd());
$parts2 = explode("-", $parts[count($parts) - 1]); $parts2 = explode("-", $parts[count($parts) - 1]);
$buildName = $parts2[1]; $buildName = $parts2[1];
echo "<title>Build Notes for $buildName </title>"; echo "<title>Build Notes for $buildName </title>";
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <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"> <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css"
type="text/css">
</head> </head>
<body> <body>
<p><b><font face="Verdana" size="+3">Build Notes</font></b> </p> <p><b><font face="Verdana" size="+3">Build Notes</font></b></p>
<table border=0 cellspacing=5 cellpadding=2 width="100%" > <table border=0 cellspacing=5 cellpadding=2 width="100%">
<tr> <tr>
<td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica"> <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
Build Notes for <?php echo "$buildName"; ?></font></b></td> color="#FFFFFF" face="Arial,Helvetica"> Build Notes for <?php echo "$buildName"; ?></font></b></td>
</tr> </tr>
</table> </table>
<table border="0"> <table border="0">
<?php <?php
$hasNotes = false; $hasNotes = false;
$aDirectory = dir("buildnotes"); $aDirectory = dir("buildnotes");
while ($anEntry = $aDirectory->read()) { while ($anEntry = $aDirectory->read()) {
if ($anEntry != "." && $anEntry != "..") { if ($anEntry != "." && $anEntry != "..") {
$parts = explode("_", $anEntry); //print_r($anEntry);
$baseName = $parts[1]; //echo "<br />";
$parts = explode(".", $baseName);
$component = $parts[0]; $subject = $anEntry;
$line = "<td>Component: <a href=\"buildnotes/$anEntry\">$component</a></td>"; $pattern = '/^buildnotes_(.*)/i';
echo "<tr>"; preg_match($pattern, $subject, $matches);
echo "$line"; $subject = $matches[1];
echo "</tr>"; //print_r($subject);
$hasNotes = true; //echo "<br />";
} $pattern = '/^(.*)\.html$/';
} preg_match($pattern, $subject, $matches);
aDirectory.closedir(); //print_r($matches);
if (!$hasNotes) { //echo "<br />";
echo "<br>There are no build notes for this build.";
} $component = $matches[1];
$line = "<td>Component: <a href=\"buildnotes/$anEntry\">$component</a></td>";
echo "<tr>";
echo "$line";
echo "</tr>";
$hasNotes = true;
}
}
$aDirectory.closedir();
if (!$hasNotes) {
echo "<br>There are no build notes for this build.";
}
?> ?>
</table> </table>
......
releng.wtpbuilder/distribution/dali.site/staticDropFiles/compile_err.gif

167 B

releng.wtpbuilder/distribution/dali.site/staticDropFiles/compile_warn.gif

152 B

<html>
<head>
<?php
function find_component_xml($directory)
{
$count = 0;
$dir = dir($directory);
while ($anEntry = $dir->read())
{
if ($anEntry != "." && $anEntry != "..")
{
$anEntry = $directory."/".$anEntry;
if (stristr($anEntry, '.source') === FALSE)
{
if (is_dir($anEntry))
{
find_component_xml($anEntry);
}
else
{
echo "<tr><td><a href=\"$anEntry\">";
echo substr($anEntry, 22);
echo "</a></td>";
}
}
}
}
}
?>
<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">component.xml</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">
component.xml files for <?php echo "$buildType $buildName"; ?></font></b></td>
</tr>
</table>
<table border="1" width="100%">
<tr>
<th>component.xml</th>
</tr>
<?php
find_component_xml("apitools/componentxmls");
?>
</table>
</body>
</html>
<html> <html>
<head> <head>
<?php <?php
$parts = explode("/", getcwd()); $parts = explode("/", getcwd());
$parts2 = explode("-", $parts[count($parts) - 1]); $parts2 = explode("-", $parts[count($parts) - 1]);
$buildName = $parts2[1]; $buildName = $parts2[1];
echo "<title>Test Console Output for $buildName </title>"; echo "<title>Test Console Output for $buildName </title>";
?> ?>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <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"> <link rel="stylesheet" href="http://dev.eclipse.org/default_style.css"
<title>Console Logs from Running JUnit Plug-in Tests</title></head> type="text/css">
<title>Console Logs from Running JUnit Plug-in Tests</title>
</head>
<body> <body>
<p><b><font face="Verdana" size="+3">Test Console Output</font></b> </p> <p><b><font face="Verdana" size="+3">Test Console Output</font></b></p>
<table border=0 cellspacing=5 cellpadding=2 width="100%" > <table border=0 cellspacing=5 cellpadding=2 width="100%">
<tr> <tr>
<td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font color="#FFFFFF" face="Arial,Helvetica">Console <td align=LEFT valign=TOP colspan="3" bgcolor="#0080C0"><b><font
output from running JUnit plugin tests for color="#FFFFFF" face="Arial,Helvetica">Console output from running
<?php echo "$buildName"; ?> JUnit plugin tests for <?php echo "$buildName"; ?> </font></b></td>
</font></b></td> </tr>
</tr>
</table> </table>
<table border="0"> <table border="0">
<?php <?php
$hasNotes = false; $rootDir = "testResults/consolelogs";
$aDirectory = dir("testResults/consolelogs"); $hasNotes = false;
$index = 0; $aDirectory = dir($rootDir);
while ($anEntry = $aDirectory->read()) { $index = 0;
if ($anEntry != "." && $anEntry != "..") { $dirindex = 0;
$entries[$index] = $anEntry; while ($anEntry = $aDirectory->read()) {
$index++; if ($anEntry != "." && $anEntry != "..") {
} if (is_file("$rootDir/$anEntry")) {
} $entries[$index] = $anEntry;
$index++;
aDirectory.closedir(); } else if (is_dir("$rootDir/$anEntry")) {
sort($entries); $direntries[$dirindex] = $anEntry;
$dirindex++;
for ($i = 0; $i < $index; $i++) { }
$anEntry = $entries[$i]; }
$line = "<td>Component: <a href=\"testResults/consolelogs/$anEntry\">$anEntry</a></td>"; }
echo "<tr>"; $aDirectory->close();
echo "$line";
echo "</tr>";
$hasNotes = true; sort($entries);
} sort($direntries);
if (!$hasNotes) { for ($i = 0; $i < $dirindex; $i++) {
echo "<br>There are no test logs for this build."; $anEntry = $direntries[$i];
} $line = "<td><a href=\"testResults/consolelogs/$anEntry/logIndex.php\">$anEntry</a></td>";
echo "<tr>";
echo "$line";
echo "</tr>";
}
for ($i = 0; $i < $index; $i++) {
$anEntry = $entries[$i];
$logsize = filesize("testResults/consolelogs/$anEntry");
$level = 0;
if ($logsize > 20000) {
$level = 2;
}
else if ($logsize > 2000) {
$level = 1;
}
if ($level == 0) {
$line = "<td><a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</td>";
}
else if ($level == 1) {
$line = "<td><em><a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</em></td>";
} else if ($level == 2) {
$line = "<td><strong><a href=\"testResults/consolelogs/$anEntry\">$anEntry</a> ($logsize bytes)</strong></td>";
}
echo "<tr>";
echo "$line";
echo "</tr>";
$hasNotes = true;
}
if (!$hasNotes) {
echo "<br>There are no test logs for this build.";
}
?> ?>
</table> </table>
......
<html>
<head>
<title>Eclipse Dali Download Click Through</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">
<?php
$parts = explode("-", $dropFile);
$clickFile = "clickThroughs/";
for ($i =0; $i<count($parts); $i++) {
if ($i != 2) {
$clickFile = $clickFile.$parts[$i];
if ($i < count($parts) - 1) {
$clickFile = $clickFile."-";
}
}
}
$clickFile = $clickFile.".txt";
if (file_exists($clickFile)) {
$fileHandle = fopen($clickFile, "r");
while (!feof($fileHandle)) {
$aLine = fgets($fileHandle, 4096);
$result = $result.$aLine;
}
fclose($fileHandle);
} else {
echo '<META HTTP-EQUIV="Refresh" CONTENT="0;URL='.$dropFile.'">';
echo '<b><font size "+4">Downloading: '.$dropFile.'</font></b>';
echo '<BR>';
echo '<BR>';
echo 'If your download does not begin automatically click <a href="'.$dropFile.'">here</a>.';
}
?>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
if (file_exists($clickFile)) {
echo '<p><b><font size="+4">Important Notes<BR>';
echo $dropFile;
echo '</font></b></font></p>
<p>It is very important to read the following notes in order to run this version
of Eclipse. Once you have read the notes you can click on the Download link
to download the drop.</p>
';
echo '<textarea name="textfield" cols="80" rows="20" wrap="PHYSICAL">'.$result;
echo '</textarea>';
echo '<BR>';
echo '<BR>';
echo '<a href="'.$dropFile.'">Download</a>';
}
?>
</body>
</html>
releng.wtpbuilder/distribution/dali.site/staticDropFiles/junit_err.gif

220 B

<html>
<head>
<?php
function endsWith( $str, $sub ) {
return ( substr( $str, strlen( $str ) - strlen( $sub ) ) === $sub );
}
$parts = explode("/", getcwd());
$parts2 = explode("-", $parts[count($parts) - 1]);
$buildName = $parts2[1];
echo "<title>Test Console Output 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">
<title>Console Logs from Running JUnit Plug-in Tests</title></head>
<body>
<p><b><font face="Verdana" size="+3">Test Console Output</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">Console
output from running JUnit plugin tests for
<?php echo "$buildName"; ?>
</font></b></td>
</tr>
</table>
<table border="0">
<?php
$hasNotes = false;
$aDirectory = dir(".");
$index = 0;
while ($anEntry = $aDirectory->read()) {
if ($anEntry != "." && $anEntry != ".." && !endsWith(__FILE__, $anEntry)) {
$entries[$index] = $anEntry;
$index++;
}
}
aDirectory.closedir();
sort($entries);
for ($i = 0; $i < $index; $i++) {
$anEntry = $entries[$i];
$logsize = filesize("$anEntry");
$level = 0;
if ($logsize > 20000) {
$level = 2;
}
else if ($logsize > 2000) {
$level = 1;
}
if ($level == 0) {
$line = "<td><a href=\"$anEntry\">$anEntry</a> ($logsize bytes)</td>";
}
else if ($level == 1) {
$line = "<td><em><a href=\"$anEntry\">$anEntry</a> ($logsize bytes)</em></td>";
} else if ($level == 2) {
$line = "<td><strong><a href=\"$anEntry\">$anEntry</a> ($logsize bytes)</strong></td>";
}
echo "<tr>";
echo "$line";
echo "</tr>";
$hasNotes = true;
}
if (!$hasNotes) {
echo "<br>There are no test logs for this build.";
}
?>
</table>
</body>
</html>
<?php
// todo: unsure if can handle filenames that are URLs?
// handy constant to compute file size in megabytes
function fileSizeInMegs($filename) {
$onemeg=1024*1024;
$zipfilesize=filesize($filename);
$zipfilesize=round($zipfilesize/$onemeg, 0);
return $zipfilesize;
}
function fileSizeForDisplay($filename) {
$onekilo=1024;
$onemeg=$onekilo * $onekilo;
$criteria = 10 * $onemeg;
$scaleChar = "M";
$zipfilesize=filesize($filename);
if ($zipfilesize > $criteria) {
$zipfilesize=round($zipfilesize/$onemeg, 0);
$scaleChar = "M";
}
else {
$zipfilesize=round($zipfilesize/$onekilo, 0);
$scaleChar = "K";
}
$result = "(" . $zipfilesize . $scaleChar . ")";
return $result;
}
function displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription) {
echo "<td align=\"right\" valign=\"top\" width=\"30%\">";
echo "<a href=\"$downloadprefix$filename\">" . $fileShortDescription . "</a>";
echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">";
echo $zipfilesize;
echo "</td>";
echo "<td align=\"right\" valign=\"top\" width=\"2%\">";
echo "[<a href=\"checksum/$filename.md5\">md5</a>]";
echo "</td>";
}
function resourceExist($url, $mirrorPrefixuri, $prereqfilename, $eclipseFSpathPrefix)
{
$result = false;
$allowURLopen = ini_get('allow_url_fopen');
if ($allowURLopen && stream_last_modified($url)) {
$result = true;
}
else {
// TODO: for now, we'll do a raw check on the whole file name, since enable_url_open
// is off. better would be to check if we are on build.eclipse.org or download.eclipse.org?
$wholePath = trim($eclipseFSpathPrefix) . "/" . trim($mirrorPrefixuri) . "/" . trim($prereqfilename);
if (file_exists($wholePath)) {
$result = true;
}
}
return $result;
}
function stream_last_modified($url)
{
if (function_exists('version_compare') && version_compare(phpversion(), '4.3.0') > 0)
{
if (!($fp = @fopen($url, 'r')))
return NULL;
$meta = stream_get_meta_data($fp);
for ($j = 0; isset($meta['wrapper_data'][$j]); $j++)
{
if (strstr(strtolower($meta['wrapper_data'][$j]), 'last-modified'))
{
$modtime = substr($meta['wrapper_data'][$j], 15);
break;
}
}
fclose($fp);
}
else
{
$parts = parse_url($url);
$host = $parts['host'];
$path = $parts['path'];
if (!($fp = @fsockopen($host, 80)))
return NULL;
$req = "HEAD $path HTTP/1.0\r\nUser-Agent: PHP/".phpversion()."\r\nHost: $host:80\r\nAccept: */*\r\n\r\n";
fputs($fp, $req);
while (!feof($fp))
{
$str = fgets($fp, 4096);
if (strstr(strtolower($str), 'last-modified'))
{
$modtime = substr($str, 15);
break;
}
}
fclose($fp);
}
return isset($modtime) ? strtotime($modtime) : time();
}
function isMirrored($uriToCheck) {
global $debugScript;
global $debugFunctions;
$localuri = $uriToCheck;
$debugMirrorList = false;
if ($debugScript) {
echo "uriToCheck: " . $localuri . "<br />";
}
$xmlcount = 0;
/* This method true and accurate method of parsing mirror results
* may be expensive, and would
* likely cause artificially high counts of "downloads".
* Could maybe use if somehow only checked once ever 5 minutes or something.
// turn off warnings, as sometimes HTML is returned, which causes lots of warnings
$holdLevel = error_reporting(E_ERROR);
$mirrorsxml=simplexml_load_file(rawurlencode($localuri) . urlencode("&format=xml"));
error_reporting($holdLevel);
if ($mirrorsxml) {
if ($debugFunctions) {
echo "root node: " . $mirrorsxml->getName() . "<br />";
}
if (strcmp($mirrorsxml->getName(), "mirrors") == 0) {
foreach ($mirrorsxml->children() as $mirror) {
if (strcmp($mirror->getName(),"mirror") == 0) {
$xmlcount=$xmlcount+1;
}
if ($debugMirrorList) {
print_r($mirror);
echo "<br />";
}
}
}
if ($debugFunctions) {
echo "Mirror count: " . $xmlcount . "<br />";
}
}
*/
/*
* Use simple heuristic based on pattern
* in the URI ... if it contains "/downloads/" then assume it's mirrored
*/
if (strpos($uriToCheck, "webtools/downloads/") > 0) {
$xmlcount = 1;
}
return ($xmlcount > 0);
}
// TODO: replace with Phoenix variables
function getPlatform () {
global $debugScript;
global $debugFunctions;
// getBrowser is expensive, so cache the data
static $browser;
$platform = "unknown";
if(ini_get("browscap")) {
if(!isset($browser)){
$browser = get_browser(null, true);
}
if ($browser) {
$rawPlatform = $browser['platform'];
if ($debugFunctions) {
echo "browser platfrom: " . $rawPlatform . "<br />" ;
}
if ($debugFunctions) {
$browserKeys = array_keys($browser);
foreach ($browserKeys as $key) {
echo $key . ": " . $browser[$key] . "<br />";
}
}
}
if (strpos($rawPlatform, "Win") === 0) {
$platform="windows";
} else if (strpos($rawPlatform, "Linux") === 0) {
$platform="linux";
} else if (strpos($rawPlatform, "Mac") === 0) {
$platform="mac";
}
}
return $platform;
}
function getPrereqReferenceOrName($eclipseMirrorScript, $mirrorPrefixuri, $prerequrl, $prereqfilename, $eclipseFSpathPrefix) {
// todo: we really only need "if exists" so could make a bit more efficient
// I tried "file_exists" but is didn't seem to work on my test server
// For these pre-reqs, we assume if they exist, they are mirrored. This is true
// 99% of the time.
if (resourceExist($prerequrl, $mirrorPrefixuri, $prereqfilename, $eclipseFSpathPrefix)) {
$reflink="<a href=\"" . $eclipseMirrorScript . $mirrorPrefixuri . "/" . $prereqfilename . "\">" . $prereqfilename . "</a>";
} else {
$reflink=$prereqfilename;
}
return $reflink;
}
?>
releng.wtpbuilder/distribution/dali.site/staticDropFiles/pending.gif

365 B

releng.wtpbuilder/distribution/dali.site/staticDropFiles/pending1.gif

958 B

<html>
<head>
<?php
function write_unused_property($directory)
{
$count = 0;
$dir = dir($directory);
while ($anEntry = $dir->read())
{
if ($anEntry != "." && $anEntry != "..")
{
$anEntry = $directory."/".$anEntry;
if (is_dir($anEntry))
{
write_unused_property($anEntry);
}
else
{
echo "<tr><td><a href=\"$anEntry\">";
echo substr($anEntry, 16);
echo "</a></td>";
$lines = file($anEntry);
$count = count($lines);
echo "<td>$count</td></tr>";
}
}
}
}
?>
<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">Unused property messages</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">
Unused property messages for <?php echo "$buildType $buildName"; ?></font></b></td>
</tr>
</table>
<table border="1">
<tr>
<th>Properties file</th>
<th>Unused strings</th>
</tr>
<?php
write_unused_property("piitools");
?>
</table>
</body>
</html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment