diff --git a/releng.wtpbuilder/components/wtp-patches32x/allElements.xml b/releng.wtpbuilder/components/wtp-patches32x/allElements.xml new file mode 100644 index 0000000000000000000000000000000000000000..2bcb686702ddaca1d79351c19f90533d6bff6bd4 --- /dev/null +++ b/releng.wtpbuilder/components/wtp-patches32x/allElements.xml @@ -0,0 +1,108 @@ +<project name="allElements Delegator"> + <property + name="defaultAssemblyEnabled" + value="true"/> + <!-- + ===================================================================== + --> + <!-- Run a given ${target} on all elements being built --> + <!-- + By default ${topLevelElementType} and ${topLevelElementId} + should be + --> + <!-- + defined in the builder's build.properties file. You can + customize by + --> + <!-- setting the type/id values directly here. --> + <!-- + You can add additional calls to ${genericTargets} to build more + top + --> + <!-- level elements. --> + <!-- --> + <!-- + The top level must exist in the ${buildDirectory}, + ${baseLocation} or + --> + <!-- ${pluginPath} locations. --> + <!-- + ===================================================================== + --> + <target name="allElementsDelegator"> + <ant + antfile="${genericTargets}" + target="${target}"> + <property + name="type" + value="${topLevelElementType}"/> + <property + name="id" + value="${topLevelElementId}"/> + </ant> + </target> + <!-- + ====================================================================== + --> + <!-- + The default assemble target, this will be called to assemble + each + --> + <!-- config if a custom assemble target is not defined. --> + <!-- The following properties will be defined: --> + <!-- + config : The configuration being assembled eg "win32.win32.x86" + --> + <!-- element: The element being assembled eg "org.eclipse.sdk" --> + <!-- assembleScriptName: The assemble script to be called --> + <!-- + ====================================================================== + --> + <target name="defaultAssemble"> + <echo message="defaultAssemble assembleScriptName: ${assembleScriptName}"/> + <ant + antfile="${assembleScriptName}" + dir="${buildDirectory}"/> + </target> + <!-- + ===================================================================== + --> + <!-- Custom targets to assemble the built elements for particular --> + <!-- + configurations. These generally call the generated assemble + scripts + --> + <!-- + (named in ${assembleScriptName}) but may also add pre and post + --> + <!-- processing --> + <!-- + Add one target for each root element and each configuration for + which + --> + <!-- + custom processing is desired. Replace element.id with the id of + the + --> + <!-- + top level element being built. A property with a matching name + must + --> + <!-- + be defined for this custom target to be called instead of the + --> + <!-- defaultAssemble target above. --> + <!-- Example: name="assemble.org.eclipse.sdk" --> + <!-- Example: name="assemble.org.eclipse.sdk.win32.win32.x86" --> + <!-- + ====================================================================== + --> + <property + name="assemble.element.id[.config.spec]" + value="true"/> + <target name="assemble.element.id[.config.spec]"> + <ant + antfile="${assembleScriptName}" + dir="${buildDirectory}"/> + </target> +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/components/wtp-patches32x/build.properties b/releng.wtpbuilder/components/wtp-patches32x/build.properties new file mode 100644 index 0000000000000000000000000000000000000000..5d09992be8c41f9dba819b518b7cfa1c5febd7f9 --- /dev/null +++ b/releng.wtpbuilder/components/wtp-patches32x/build.properties @@ -0,0 +1,52 @@ +############################################################################### +# Copyright (c) 2003, 2010 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### + +# This property file is used automatically by the PDE build process + +runPackager=true + +# This is a subdirectory of $buildDirectory +# Set collectingFolder and archivePrefix to . if you want to create archives without +# trailing eclipse in the paths of the included files +collectingFolder=eclipse +logExtension=.xml +# The prefix that will be used in the generated archive. +# Does not make sense to use a different archivePrefix than collectingFolder, +# because zip wouldn't find any files to include into the target zip otherwise +archivePrefix=eclipse + +# Whether or not to include debug info in the output jars +javacDebugInfo=true + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=false + +################################################## +# Asks the compiler for verbose output. This should be set to true in order for *.bin.log files to be generated when +# using the JDT Compiler Adapter to compile. +javacVerbose=true + +sign=true + +p2.gathering=true +p2.compress=true +skipMirroring=true + +flattenDependencies=true +parallelCompilation=true + +generateSourceReferences=true + +compilelogsDir=compilelogs + +topLevelElementType=feature + +topLevelElementId=org.eclipse.wtp.patch.assembly.feature diff --git a/releng.wtpbuilder/components/wtp-patches32x/category.xml b/releng.wtpbuilder/components/wtp-patches32x/category.xml new file mode 100644 index 0000000000000000000000000000000000000000..1497efa2b45ccc19adc72d1b867e4df525f5c515 --- /dev/null +++ b/releng.wtpbuilder/components/wtp-patches32x/category.xml @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8"?> +<site> + + <feature + id="org.eclipse.wst.common_core.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.wst.common_ui.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.wst.server_core.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.wst.server_ui.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + + <feature + id="org.eclipse.wst.xml_core.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.wst.jsdt.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.wst.web_core.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + + <feature + id="org.eclipse.wst.web_ui.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + + + <feature + id="org.eclipse.jst.web_core.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.jst.web_ui.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + <feature + id="org.eclipse.jst.enterprise_ui.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + + <feature + id="org.eclipse.jpt.feature.patch"> + <category + name="Web Tools Platform (WTP) Patches @buildversionid@"/> + </feature> + + + <feature + id="org.eclipse.wtp.releng.tests.feature.patch"> + <category + name="Web Tools Platform Tests (WTP Tests) Patches @buildversionid@"/> + </feature> + + + + + <category-def + name="Web Tools Platform Tests (WTP Tests) Patches @buildversionid@" + label="Web Tools Platform Tests (WTP Tests) Patches @buildversionid@"> + <description> + These features provide patches for WTP unit tests. + </description> + </category-def> + + <category-def + name="Web Tools Platform (WTP) Patches @buildversionid@" + label="Web Tools Platform (WTP) Patches @buildversionid@"> + <description> + These features provide patches for WTP. + </description> + </category-def> + <!-- + <category-def + name="Web Tools Platform (WTP SDK) Patches @buildversionid@" + label="Web Tools Platform (WTP SDK) Patches @buildversionid@"> + <description> + These features provide patches for WTP SDK. + </description> + </category-def> + --> +</site> diff --git a/releng.wtpbuilder/components/wtp-patches32x/customTargets.xml b/releng.wtpbuilder/components/wtp-patches32x/customTargets.xml new file mode 100644 index 0000000000000000000000000000000000000000..3154a14199e89c97c307363d74cad4188e2f69c2 --- /dev/null +++ b/releng.wtpbuilder/components/wtp-patches32x/customTargets.xml @@ -0,0 +1,377 @@ +<project + name="PDECustomTargets" + default="noDefault" + basedir="."> + <!-- + = = = standard properties pattern = = = 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 the environment variables on your operating + system are not, e.g. it will be ${env.Path} not ${env.PATH} on + Windows + --> + <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"/> + + <!-- let this project specify properties, if not already set --> + <property file="build.properties"/> + <fail + message="dependency.properties must be specified by distribution script" + unless="dependency.properties"/> + <fail + unless="buildDirectory" + message="buildDirectory must be set"/> + + <property + name="archiveName" + value="${component}-buildrepo-${buildLabel}.zip"/> + <property + name="p2.metadata.repo.name" + value="WTP Build repository: ${buildLabel}/${component}"/> + <property + name="p2.artifact.repo.name" + value="WTP Build repository: ${buildLabel}/${component}"/> + <property + name="p2buildrepoDirectory" + value="${buildDirectory}/${buildLabel}/buildrepository/${component}/"/> + <property + name="p2.build.repo" + value="file://${p2buildrepoDirectory}/"/> + + + <property + name="p2.category.definition.file" + value="${buildDirectory}/maps/${env.RELENG}/components/${component}/category.xml"/> + + <property + name="p2.category.definition" + value="file:/${p2.category.definition.file}"/> + + <!-- + Run a given ${target} on all elements being built Add on <ant> + task for each top level element being built. + --> + <available + property="allElementsFile" + file="${builder}/allElements.xml" + value="${builder}/allElements.xml"/> + <property + name="allElementsFile" + location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/> + <import file="${allElementsFile}"/> + <target + name="allElements" + depends="init"> + + <antcall target="allElementsDelegator"/> + </target> + + <!-- + Check out map files from repository + --> + <target name="getMapFiles"> + + <!-- for now, get all, at once. May componetize later. --> + <ant + antfile="${wtp.builder.home}/scripts/build/maptasks.xml" + target="fetchAllMaps"/> + </target> + + + <!-- + Steps to do before setup + --> + <target name="preSetup"> + </target> + <!-- + Steps to do after setup but before starting the build proper + --> + <target + name="postSetup" + depends="init"> + <dirname + file="${ant.file}" + property="component.dir"/> + + + <!-- Get the dependencies --> + <antcall target="getDependencies"/> + + <antcall target="updateCategoriesFiles"/> + </target> + <!-- + ===================================================================== + --> + <!-- Get the dependencies based on releng maps --> + <!-- + ===================================================================== + --> + <target name="getDependencies"> + <ant + antfile="${wtp.builder.home}/scripts/dependency/dependency.xml" + target="get"> + <property + name="base.install.dir" + value="${buildRoot}"/> + <property + name="tobeinstalled.properties" + value="${buildDirectory}/maps/${env.RELENG}/components/${component}/tobeInstalled.properties"/> + + </ant> + </target> + + <!-- + Steps to do before fetching the build elements + --> + <target name="preFetch"> + </target> + <target name="postFetch"> + <ant + antfile="${wtp.builder.home}/scripts/build/maptasks.xml" + target="unrewriteMaps"/> + </target> + <!-- + Steps to do before the repositories are being processed + --> + <target name="preProcessRepos"> + </target> + <!-- + Steps to do after the repositories have been processed + --> + <target name="postProcessRepos"> + </target> + + <!-- + Steps to do before generating the build scripts. + --> + <target name="preGenerate"> + </target> + + <!-- + Steps to do after generating the build scripts. + --> + <target name="postGenerate"> + + <ant antfile="${wtp.builder.home}/scripts/build/customizeAccessRules.xml"/> + </target> + <!-- + Steps to do before running the build.xmls for the elements being + built. + --> + <target name="preProcess"> + <replace + dir="${buildDirectory}/plugins" + value="${timestamp}" + token="@build@"> + <include name="**/about.mappings"/> + </replace> + </target> + <!-- + Steps to do after running the build.xmls for the elements being + built. + --> + <target name="postProcess"> + <condition property="logsAvailable"> + <istrue value="${javacVerbose}"/> + </condition> + <antcall target="gatherLogs"/> + </target> + + <!-- Steps to do before running assemble. --> + <target name="preAssemble"> + </target> + + <!-- + Steps to do after running assemble. + --> + <target name="postAssemble"> + + <ant + antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml" + target="conditionAndSignJars"/> + <ant + antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml" + target="finishPackages"/> + + </target> + + <!-- + Steps to do after the build is done. + --> + <target name="prePackage"> + </target> + + <!-- Steps to do after running package. --> + <target name="postPackage"> + </target> + + <!-- + Steps to do after the build is done. + --> + <target name="postBuild"> + </target> + + <!-- + Steps to do to test the build results + --> + <target name="test"> + </target> + + <!-- + Steps to do to publish the build results + --> + <target name="publish"> + </target> + + <!-- + Helper targets + --> + <target + name="gatherLogs" + if="logsAvailable" + depends="init"> + <mkdir dir="${buildDirectory}/${buildLabel}/${compilelogsDir}"/> + + <antcall target="allElements"> + <param + name="target" + value="gatherLogs"/> + <param + name="logExtension" + value="${logExtension}"/> + </antcall> + <unzip + dest="${buildDirectory}/${buildLabel}/${compilelogsDir}" + overwrite="true"> + <fileset dir="${buildDirectory}/features/${topLevelElementId}"> + <include name="**/*.log.zip"/> + </fileset> + </unzip> + <!-- + workaround: see + https://bugs.eclipse.org/bugs/show_bug.cgi?id=156043 and + https://bugs.eclipse.org/bugs/show_bug.cgi?id=172361 and + https://bugs.eclipse.org/bugs/show_bug.cgi?id=294070 + --> + + <copy + todir="${buildDirectory}/${buildLabel}/${compilelogsDir}/plugins" + overwrite="true"> + <!-- + we want all @dot.xml files, but assumes a certain + structure, to include directory for name of plugin + --> + <fileset dir="${buildDirectory}/features/"> + <include name="**/feature.temp.folder/"/> + <exclude name="**/*tests*feature*/feature.temp.folder/"/> + </fileset> + <compositemapper> + <mapper + type="regexp" + from="(.*)/plugins/(.*)/@dot.xml" + to="/\2/@dot.xml"/> + <mapper + type="regexp" + from="(.*)/plugins/(.*)/(.*)bin.xml" + to="/\2/\3bin.xml"/> + </compositemapper> + </copy> + + </target> + <target + name="clean" + unless="noclean"> + <antcall target="allElements"> + <param + name="target" + value="cleanElement"/> + </antcall> + </target> + + <!-- + Note: buildId is typically of the form "3.3.0" + may want to use buildLabel, which is of form I-3.3.0-20100912032913 + --> + + <target + name="updateCategoriesFiles" + depends="checkCategoriesFiles" + if="categoryFileExists"> + <replace + file="${p2.category.definition.file}" + value="${buildId}" + token="@buildversionid@"> + </replace> + + + </target> + <target name="checkCategoriesFiles"> + <available + file="${p2.category.definition.file}" + property="categoryFileExists"/> + </target> + + + <!-- + Default target + --> + <target name="noDefault"> + <echo + level="error" + message="You must specify a target when invoking this file"/> + </target> + + + <target + name="init" + unless="customTargetsInitialized"> + + <echo message="buildDirectory: ${buildDirectory}"/> + <echo message="p2.build.repo: ${p2.build.repo}"/> + <echo message="p2.category.definition: ${p2.category.definition}"/> + <echo + level="info" + message="target: ${target} "/> + <echo + level="info" + message="basedir: ${basedir}"/> + <echo + level="info" + message="component: ${component}"/> + <echo + level="info" + message="buildDirectory: ${buildDirectory}"/> + <echo + level="info" + message="baseLocation: ${baseLocation}"/> + <echo + level="info" + message="generic target: ${genericTargets}"/> + <echo + level="info" + message="topLevelElementId: ${topLevelElementId}"/> + <echo message="compilerArg: ${compilerArg}"/> + <echo message="individualSourceBundles: ${individualSourceBundles}"/> + <echo message="generatedVersionLength: ${generatedVersionLength}" /> + <echo + level="debug" + message="ant.file: ${ant.file}"/> + <echo + level="debug" + message="component.dir: ${component.dir}"/> + <echo + level="debug" + message="logExtension: ${logExtension}"/> + <property + name="customTargetsInitialized" + value="true"/> + + + </target> + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.build/build.xml b/releng.wtpbuilder/distribution/patches32x.build/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..501b18d530f51df8b171ce8ffaaba13a560944ac --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.build/build.xml @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project + default="build" + basedir="."> + <fail unless="wtp.builder.home"/> + <property file="${wtp.builder.home}/build.properties"/> + <property environment="env"/> + + <!-- required to get proper value of doCreateFprojZips --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + + <echo message="transformedRepoLocation: ${transformedRepoLocation}"/> + <mkdir dir="${transformedRepoLocation}"/> + + + <!-- main --> + <target + name="build" + depends="getBaseBuilder"> + + <property + name="buildTargets" + value="${wtp.builder.home}/scripts/build/runbuild.xml"/> + <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> + + <property + name="dependency.properties" + value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> + + <echo + level="debug" + message="invoking buildTargets: ${buildTargets} to build for each component"/> + + <ant antfile="${buildTargets}"> + <property + name="component" + value="wtp-patches32x"/> + </ant> + + <ant antfile="${buildTargets}"> + <property + name="eclipseBuildFailOnError" + value="false"/> + </ant> + <!-- + <ant + antfile="${buildTargets}"> + <property + name="component" + value="wtp-patches32x-tests"/> + <property + name="eclipseBuildFailOnError" + value="false"/> + </ant> + --> + + <!-- copy early, if we can ... else site won't be created, if we fail --> + <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/> + + <antcall target="handleCompilationProblems"/> + + + </target> + + + + + <target + name="handleCompilationProblems" + depends="checkIfCompileProblems" + if="compilation.problem.found"> + + <!-- if there is a problem, leave a marker file in download directory, so the webpage can + describe what happened --> + + <echo + message="Compilation problems were found" + file="${buildDirectory}/${buildLabel}/compilationProblems.txt"/> + + <!-- always force an early copy, before fail, so all results and files get to "downloads" area --> + <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/> + <fail + if="compilation.problem.found" + message="The remaining build and tests were canceled since compilation problems were found."/> + </target> + + + <target name="checkIfCompileProblems"> + <!-- + Not sure how reliable the presence of this 'compilation.problem' file is ... + I just noticed it in recent PDE builds with compile problems. + May have to make this "fancier" in future. + For now, looks only one level down in plugins directory (in build's workdir) for a file with + the name 'complilation.problem'. We may have a "summary" in xml file format, summarizing logs, + ... but not sure then created (during site? We'd have to call site first. This way, we'll see if the match :) . + --> + <available + file="compilation.problem" + type="file" + property="compilation.problem.found"> + <filepath> + <dirset dir="${buildDirectory}"> + <include name="plugins/*"/> + </dirset> + + </filepath> + </available> + <echo message="compilation.problem path buildDirectory: ${buildDirectory}/plugins/*/"/> + </target> + + <!-- invoking runbuild.xml targetting getBaseBuilder --> + <target + name="getBaseBuilder" + if="eclipse.builder.fetch"> + <dirname + file="${ant.file}" + property="wtbuilder.dir"/> + <property + name="buildTargets" + value="${wtp.builder.home}/scripts/build/runbuild.xml"/> + <echo + level="info" + message="invoking buildTargets: ${buildTargets} -> getBaseBuilder"/> + <ant + antfile="${buildTargets}" + target="getBaseBuilder"/> + </target> + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.package/build.xml b/releng.wtpbuilder/distribution/patches32x.package/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..c9ad7261da71f63d6714f54796bed6b5426a3c46 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.package/build.xml @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project + default="package" + basedir="."> + <fail + unless="wtp.builder.home" + message="wtp.build.home needs to be definded for this script"/> + <property file="${wtp.builder.home}/build.properties"/> + <property environment="env"/> + + <!-- required to get proper value of branch specific values --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + + <target + name="package" + description="Create the main repository for this build, and any desired zip file distributions"> + <ant antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml"> + <property + name="antrunnerfile" + value="${wtp.builder.home}/distribution/${build.distribution}.package/createFinalRepo.xml"/> + </ant> + + + <ant antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml"> + <property + name="antrunnerfile" + value="${wtp.builder.home}/distribution/${build.distribution}.package/createmainzips.xml"/> + </ant> + + <ant antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml"> + <property + name="antrunnerfile" + value="${wtp.builder.home}/distribution/${build.distribution}.package/createjaxws.xml"/> + </ant> + <ant antfile="${wtp.builder.home}/scripts/build/runAntRunner.xml"> + <property + name="antrunnerfile" + value="${wtp.builder.home}/distribution/${build.distribution}.package/createnoopzips.xml"/> + </ant> + </target> + + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.package/createFinalRepo.xml b/releng.wtpbuilder/distribution/patches32x.package/createFinalRepo.xml new file mode 100644 index 0000000000000000000000000000000000000000..f4ee611449752317a8d370342011ca2bedfb7dd2 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.package/createFinalRepo.xml @@ -0,0 +1,331 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + create final build repo. + Eventually may want to "move" this to each component, in "post build" step? + See http://aniefer.blogspot.com/2009/08/versioning-p2-slides-from-eclipsecon.html + for example of comparator. +--> +<project + name="createFinalRepo" + default="build" + basedir="."> + + <!-- = = = standard properties pattern = = = --> + <!-- + 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 the environment variables + on your operating system are not, e.g. it will be ${env.Path} + not ${env.PATH} on Windows + --> + <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 = = = --> + + + + <fail unless="wtp.builder.home"/> + <property file="${wtp.builder.home}/build.properties"/> + + + <!-- required to get proper value of branch specific values, for example, + baseComparatorRepoDir, since can vary from forward "integration" stream, + and "maintenance" branch --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + + <fail + unless="baseComparatorRepoDir" + message="baseComparatorRepoDir must be defined for this ant script"/> + + <property + name="baseComparatorRepoDirTests" + value="${baseComparatorRepoDir}"/> + + <!-- if not otherwise set, use these default properties + <property + name="repoDownloadBaseURL" + value="http://build.eclipse.org/webtools/committers"/> --> + <property + name="repoDownloadBaseURL" + value=".."/> + + <fail unless="env.PROJECT_PROJECTS"/> + <fail unless="projectname"/> + <property + name="labelfile" + value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties"/> + <available + file="${labelfile}" + property="labelfileavailable"/> + <fail unless="labelfileavailable"/> + <property file="${labelfile}"/> + + + <target + name="build" + depends="doMirror,doMirrorTests"> + + <!-- add the new build to the composite --> + <!-- + TODO: after promotion, do we need to delete repo's as directories removed? Or just do occasional cleanup, + if non-existent child repos are ignored + TODO: ok to use absolute file system locations for child repos? (And still access via http, later? +--> + <!-- + + On build machine, URL's to repositories will look similar to following URL: + + http://build.eclipse.org/webtools/committers/wtp-R3.3.0-I/20100914034658/I-3.3.0-20100914034658/repository/ + + which we translate as follows + + repoDownloadBaseURL=http://build.eclipse.org/webtools/committers + + ${repoDownloadBaseURL}/${projectname}/${timestamp}/${buildLabel}/repository/ + + repoDownloadBaseURL is machine dependent (will differ from one build machine to another). + + Will be different on "download server", as well. + + --> + + <!-- remember, repoLocation won't exist until later, since it is at the "site", not the + working directory --> + + <!-- remember that repos are added to comparator set only when they are promoted to download location --> + <property + name="repoLocation" + value="${repoDownloadBaseURL}/committers/${projectname}/${timestamp}/${buildLabel}/repository/"/> + <echo + message="${line.separator} + created final build repoository at location:${line.separator} + ${repoLocation}${line.separator} + "/> +<!-- + <p2.composite.repository + destination="file:/${baseComparatorRepoDir}"> + <add> + <repository + location="${repoLocation}"/> + </add> + </p2.composite.repository> +--> + </target> + <target name="init"> + <available + file="${baseComparatorRepoDir}" + type="dir" + property="baseComparatorRepoDirExists"/> + <!-- we copy the comparator filter file, used only during tests, to build output location, + just so it is always available, even if tests ran later --> + <copy + file="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/comparatorfilter.properties" + todir="${buildDirectory}/${buildLabel}"/> + + </target> + <!-- normally, the "prime repository" should be created from previous release, + or similar, but if that hasn't been done, we'll automatically create an empty + composite repo which we've stored away for simplicity.--> + <target + name="primeRepo" + depends="init" + unless="baseComparatorRepoDirExists"> + <mkdir dir="${baseComparatorRepoDir}"/> + <copy todir="${baseComparatorRepoDir}"> + <fileset dir="${wtp.builder.home}/emptyRepository/"/> + </copy> + <!-- could probably just set to true, but we'll use same logic as in init, just in case --> + <available + file="${baseComparatorRepoDir}" + type="dir" + property="baseComparatorRepoDirExists"/> + </target> + <!-- normally, the "prime repository" should be created from previous release, + or similar, but if that hasn't been done, we'll automatically create an empty + composite repo which we've stored away for simplicity.--> + <target + name="primeTestRepo" + depends="init" + unless="baseComparatorTestRepoDirExists"> + <mkdir dir="${baseComparatorTestRepoDir}"/> + <copy todir="${baseComparatorTestRepoDir}"> + <fileset dir="${wtp.builder.home}/emptyRepository/"/> + </copy> + <!-- could probably just set to true, but we'll use same logic as in init, just in case --> + <available + file="${baseComparatorTestRepoDir}" + type="dir" + property="baseComparatorTestRepoDirExists"/> + </target> + <target + name="doMirror" + depends="primeRepo"> + <property + name="destinationDir" + value="${buildDirectory}/${buildLabel}/repository"/> + <echo message="destinationDir: ${destinationDir}"/> + + <p2.mirror + ignoreErrors="true" + verbose="true" + log="${buildDirectory}/${buildLabel}/finalMirrorRepo.log"> + + + <destination + kind="metadata" + location="file:/${destinationDir}" + name="Web Tools Platform Repository ${buildLabel}"/> + <destination + kind="artifact" + location="file:/${destinationDir}" + name="Web Tools Platform Repository ${buildLabel}"/> + <source> + <repository location="file:/${buildDirectory}/${buildLabel}/buildrepository/"/> + </source> + + <comparator + comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" + comparatorLog="${buildDirectory}/${buildLabel}/comparator.log"> + <repository location="file:/${baseComparatorRepoDir}"/> + <!-- Note: comparator has fixed this issues in 3.7 stream, but + since we use this same code in maintenance stream, with 3.6 based builder, + then we need to leave these excluded in place (or, make them stream sensitive, + which doesn't seem worth it + --> + <exclude> + <artifact id="org.eclipse.jpt.eclipselink.ui"/> + <artifact id="org.eclipse.jpt.ui"/> + <artifact id="org.eclipse.jst.jsp.core.tests"/> + </exclude> + </comparator> + + <!-- + followStrict is sort of a safety measure. All our features should be strict, but in case not, + will show up early if not mirrored. + + + --> + <slicingoptions + followStrict="true" + includeNonGreedy="false" + includeOptional="false"/> + + <!-- + Specify category and let it pull in its features. + TODO: would be best to make "property[@name='org.eclipse.equinox.p2.type.category']" part of the query, + but a) not sure if/how it will work and b) our names are distinct enough now this suffices. + --> + + <iu query="property[@name='org.eclipse.equinox.p2.name' and @value='Web Tools Platform (WTP) ${buildId}']"/> + + <iu query="property[@name='org.eclipse.equinox.p2.name' and @value='Web Tools Platform SDK (WTP SDK) ${buildId}']"/> + +<!-- + <iu + query="property[@name='org.eclipse.equinox.p2.name' and @value='Web Tools Platform SDK (WTP SDK) Patches ${buildId}']"/> + --> + </p2.mirror> + + <!-- create archived repo from contents of 'repository' at this point --> + <property + name="zippedrepo" + value="${build.distribution}-repo-${buildLabel}.zip"/> + <zip + destfile="${buildDirectory}/${buildLabel}/${zippedrepo}" + basedir="${buildDirectory}/${buildLabel}/repository"/> + + <ant + antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml" + target="createChecksums"> + <property + name="archiveName" + value="${zippedrepo}"/> + </ant> + + </target> + <target + name="doMirrorTests" + depends="primeTestRepo"> + <property + name="destinationDirTests" + value="${buildDirectory}/${buildLabel}/repositoryunittests"/> + <echo message="destinationDirTests: ${destinationDirTests}"/> + + <p2.mirror + ignoreErrors="true" + verbose="true" + log="${buildDirectory}/${buildLabel}/finalMirror-unittestrepository.log"> + + + <destination + kind="metadata" + location="file:/${destinationDirTests}" + name="Web Tools Platform Repository for Unit Tests ${buildLabel}"/> + <destination + kind="artifact" + location="file:/${destinationDirTests}" + name="Web Tools Platform Repository for Unit Tests ${buildLabel}"/> + + + <source> + <repository location="file:/${buildDirectory}/${buildLabel}/buildrepository/"/> + </source> + + <comparator + comparator="org.eclipse.equinox.p2.repository.tools.jar.comparator" + comparatorLog="${buildDirectory}/${buildLabel}/comparator-unittest.log"> + <repository location="file:/${baseComparatorRepoDir}"/> + <exclude> + <artifact id="org.eclipse.jpt.eclipselink.ui"/> + <artifact id="org.eclipse.jpt.ui"/> + <artifact id="org.eclipse.jst.jsp.core.tests"/> + </exclude> + </comparator> + + <slicingoptions + followStrict="true" + includeNonGreedy="false" + includeOptional="false"/> + + <!-- + Specify category and let it pull in its features. + --> + <iu + query="property[@name='org.eclipse.equinox.p2.name' and (@value='Web Tools Platform Tests (WTP Tests) Patches ${buildId}')]"/> + + + </p2.mirror> + + <!-- create archived repo from contents of 'repository' at this point --> + <property + name="zippedtestsrepo" + value="${build.distribution}-tests-repo-${buildLabel}.zip"/> + <zip + destfile="${buildDirectory}/${buildLabel}/${zippedtestsrepo}" + basedir="${buildDirectory}/${buildLabel}/repositoryunittests"/> + + <ant + antfile="${wtp.builder.home}/scripts/build/buildutilitiesp2.xml" + target="createChecksums"> + <property + name="archiveName" + value="${zippedtestsrepo}"/> + </ant> + + + + </target> + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.package/createmainzips.xml b/releng.wtpbuilder/distribution/patches32x.package/createmainzips.xml new file mode 100644 index 0000000000000000000000000000000000000000..2562d685c3e9f1099090f28f87273fae1a62b717 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.package/createmainzips.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8"?> + <!-- + This script is to create some zips with core features only. + Limited, specialized usefulness, so they are not linked or + advertised. That is, could change at any time. + --> +<project + default="build" + basedir="."> + + + <!-- = = = standard properties pattern = = = --> + <!-- + 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 the environment variables + on your operating system are not, e.g. it will be ${env.Path} + not ${env.PATH} on Windows + --> + <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 = = = --> + + + + <fail unless="wtp.builder.home"/> + <property file="${wtp.builder.home}/build.properties"/> + + + <!-- required to get proper value of branch specific values, for example, + baseComparatorRepoDir, since can vary from forward "integration" stream, + and "maintenance" branch --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + + <fail + unless="baseComparatorRepoDir" + message="baseComparatorRepoDir must be defined for this ant script"/> + + + <!-- if not otherwise set, use these default properties + <property + name="repoDownloadBaseURL" + value="http://build.eclipse.org/webtools/committers"/> --> + <property + name="repoDownloadBaseURL" + value=".."/> + + <fail unless="env.PROJECT_PROJECTS"/> + <fail unless="projectname"/> + <property + name="labelfile" + value="${env.PROJECT_PROJECTS}/${projectname}/workdir/label.properties"/> + <available + file="${labelfile}" + property="labelfileavailable"/> + <fail unless="labelfileavailable"/> + <property file="${labelfile}"/> + + + + <!-- + These properties are normally set by calling task, but for + "local" tests from command line, they can be set here + --> + <property + name="buildDirectory" + value="/shared/webtools/committers/wtp-R3.2.0-I/20091029001529"/> + <property + name="buildLabel" + value="I-3.2.0-20091029030635"/> + <property + name="wtp.builder.home" + value="/shared/webtools/projectBuilders/wtp-R3.2.0-I/webtools.releng/releng.wtpbuilder"/> + <echo message="buildDirectory: ${buildDirectory}"/> + <echo message="buildLabel: ${buildLabel}"/> + <echo message="wtp.builder.home: ${wtp.builder.home}"/> + <!-- + three convenience variables to help avoid typos, etc. Should + never need to be changed + --> + <property + name="tempDir" + value="${buildDirectory}/${buildLabel}/tempdir"/> + <property + name="tempRunnableEclipse" + value="${tempDir}/eclipse"/> + <property + name="tempRepo" + value="${buildDirectory}/${buildLabel}/temprepo"/> + <target name="build"> + <antcall target="createCodeZip"> + <param + name="newarchiveName" + value="${build.distribution}-${buildLabel}.zip"/> + </antcall> + <!-- + <antcall + target="createSDKZip"> + <param + name="newarchiveName" + value="${build.distribution}-sdk-${buildLabel}.zip"/> + </antcall> + --> + <antcall target="createTestZip"> + <param + name="newarchiveName" + value="${build.distribution}-tests-${buildLabel}.zip"/> + </antcall> + </target> + <!-- + Note: this was done as an import, since eventually there may be more than one ... differ by streams? There may be + better ways ... and may not be needed after all, since turning out to be pretty generic ... driven by "categories". + --> + <import file="${wtp.builder.home}/distribution/${build.distribution}.package/createziptasks.xml"/> +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.package/createziptasks.xml b/releng.wtpbuilder/distribution/patches32x.package/createziptasks.xml new file mode 100644 index 0000000000000000000000000000000000000000..545e3a2b4bbefc8ec00a411f8a160a74ed7ac313 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.package/createziptasks.xml @@ -0,0 +1,66 @@ +<project name="mirrortasks"> + <target name="createCodeZip"> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="premirrortasks"/> + <p2.mirror + source="${buildDirectory}/${buildLabel}/repository" + destination="${tempRepo}" + log="${buildDirectory}/${buildLabel}/mirrorlog-${newarchiveName}.log" + verbose="true"> + <slicingoptions + followstrict="true" + includeNonGreedy="false" + includeOptional="false"/> + <iu query="property[@name='org.eclipse.equinox.p2.name' and @value='Web Tools Platform (WTP) Patches ${buildId}']"/> + + </p2.mirror> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="postmirrortasks"/> + </target> + + <target name="createSDKZip"> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="premirrortasks"/> + <p2.mirror + source="${buildDirectory}/${buildLabel}/repository" + destination="${tempRepo}" + log="${buildDirectory}/${buildLabel}/mirrorlog-${newarchiveName}.log" + verbose="true"> + <slicingoptions + followstrict="true" + includeNonGreedy="false" + includeOptional="false"/> + <iu query="property[@name='org.eclipse.equinox.p2.name' and @value='Web Tools Platform (WTP SDK) Patches ${buildId}']"/> + + + </p2.mirror> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="postmirrortasks"/> + </target> + <target name="createTestZip"> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="premirrortasks"/> + <p2.mirror + source="${buildDirectory}/${buildLabel}/repositoryunittests" + destination="${tempRepo}" + log="${buildDirectory}/${buildLabel}/mirrorlog-${newarchiveName}.log" + verbose="true"> + <slicingoptions + followstrict="true" + includeNonGreedy="false" + includeOptional="false"/> + <iu + query="property[@name='org.eclipse.equinox.p2.name' and (@value='Web Tools Platform Tests (WTP Tests) Patches ${buildId}')]"/> + + + </p2.mirror> + <ant + antfile="${wtp.builder.home}/scripts/build/ziputils.xml" + target="postmirrortasks"/> + </target> +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.site/build.xml b/releng.wtpbuilder/distribution/patches32x.site/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..bcee7f89a88940c9587911758d858cacdcb90d47 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/build.xml @@ -0,0 +1,139 @@ +<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 the environment variables + on your operating system are not, e.g. it will be ${env.Path} + not ${env.PATH} on Windows + --> + <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"> + <mkdir dir="${buildDirectory}/${buildLabel}"/> + <java + jar="${eclipse.launcher}" + fork="true" + failonerror="true"> + <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> + <jvmarg value="-Dosgi.os=${env.BASEOS}"/> + <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> + <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/> + <jvmarg value="-DbuildBranch=${buildBranch}"/> + <jvmarg value="-DbuildType=${buildType}"/> + <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/> + + <jvmarg value="-DbuildId=${buildId}"/> + <jvmarg value="-DmapVersionTag=${mapVersionTag}"/> + <jvmarg value="-Dbuild.distribution=${build.distribution}"/> + <jvmarg value="-DbuildDirectory=${buildDirectory}"/> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> + <jvmarg value="-Dprojectname=${projectname}"/> + <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> + <jvmarg value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/> + <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/> + <arg value="-data"/> + <arg value="${basedir}/workspace"/> + <arg value="-application"/> + <arg value="org.eclipse.ant.core.antRunner"/> + <arg value="-buildfile"/> + <arg value="${ant.file}"/> + <arg value="publish"/> + </java> + </target> + <!-- + ===================================================================== + --> + <!-- Steps to do to publish the build results --> + <!-- + ===================================================================== + --> + <target name="publish"> + <dirname + file="${ant.file}" + property="component.dir"/> + <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> + <property file="${buildDirectory}/label.properties"/> + <property + name="publish.xml" + value="${component.dir}/publish.xml"/> + <property + name="indexFileName" + value="index.php"/> + <property + name="result" + value="${buildDirectory}/${buildLabel}"/> + <property + name="indexTemplateFilename" + value="index.html.template.php"/> + + <condition + property="isBuildTested" + value="true"> + <available file="${buildDirectory}/${buildLabel}/testResults/html"/> + </condition> + <ant + antfile="${publish.xml}" + dir="${component.dir}"> + <property + name="dropTokenList" + value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/> + <property + name="webtoolsDownloadURL" + value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/> + <property + name="buildBranch" + value="${buildBranch}"/> + <property + name="isBuildTested" + value="${isBuildTested}"/> + <property + name="indexTemplateFilename" + value="${indexTemplateFilename}"/> + </ant> + + <!-- Get the build map over for the results to point to. --> + <copy + file="${buildDirectory}/directory.txt" + tofile="${result}/directory.txt"/> + + <!-- Copy info for build identification --> + <copy + file="${buildDirectory}/label.properties" + tofile="${result}/label.properties"/> + + <!-- http access logs --> + <copy + todir="${result}/" + failonerror="false"> + <fileset + dir="${buildDirectory}" + includes="*.log"/> + </copy> + + <!-- ant build log, from control directory --> + <copy + todir="${result}/" + failonerror="false"> + <fileset + dir="${env.ANT_WORKING}/${projectname}" + includes="antBuilderOutput.log"/> + </copy> + + <!-- final count files --> + <countBuildFiles + sourceDirectory="${buildDirectory}/${buildLabel}" + filterString=".zip,.tar.gz" + outputFile="${buildDirectory}/${buildLabel}/files.count"/> + </target> +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.site/compilerXMLOutputToHTML.xsl b/releng.wtpbuilder/distribution/patches32x.site/compilerXMLOutputToHTML.xsl new file mode 100644 index 0000000000000000000000000000000000000000..19f185c1f12163e778aedf41e2a93509b2464475 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/compilerXMLOutputToHTML.xsl @@ -0,0 +1,132 @@ +<?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 diff --git a/releng.wtpbuilder/distribution/patches32x.site/publish.xml b/releng.wtpbuilder/distribution/patches32x.site/publish.xml new file mode 100644 index 0000000000000000000000000000000000000000..41ed782d948cbfcc6a08872eaf80ce4adb56184f --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/publish.xml @@ -0,0 +1,1093 @@ +<project + name="Publish Build" + default="default" + basedir="."> + <!-- + Properties that must be passed to this script: buildDirectory: + Path to perform the build in. (A working directory) buildType: + Type of build (nightly, integration etc.) buildId: Build name + buildLabel: <buildType>-<buildName>-<timestamp> + --> + <property environment="env"/> + <fail + unless="buildDirectory" + message="buildDirectory must be provided to publish"/> + <fail + unless="buildLabel" + message="buildLabel must be provided to publish"/> + <fail + unless="wtp.builder.home" + message="wtp.builder.home must be provided to publish"/> + <fail + unless="build.distribution" + message="build.distribution must be provided to publish"/> + <property + name="resultDir" + value="${buildDirectory}/${buildLabel}"/> + <!--name of generated index page--> + <property + name="indexFileName" + value="index.php"/> + <property + name="templateDir" + value="${wtp.builder.home}/distribution/${build.distribution}.site"/> + <property + name="resultingIndex" + value="${resultDir}/${indexFileName}"/> + <echo + level="debug" + message="resultDir: ${resultDir}"/> + <echo + level="debug" + message="templateDir: ${templateDir}"/> + <echo + level="debug" + message="resultingIndex: ${resultingIndex}"/> + + <property + name="dependency.properties" + value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> + <available + file="${dependency.properties}" + property="dependency.properties.exists"/> + <fail + message="dependency file not found: ${dependency.properties}" + unless="dependency.properties.exists"/> + <echo message="dependency file: ${dependency.properties}"/> + <property file="${dependency.properties}"/> + <target name="default"> + <copy todir="${resultDir}"> + <fileset dir="${templateDir}/templateFiles"/> + </copy> + <copy + overwrite="true" + file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/${indexTemplateFilename}" + tofile="${resultingIndex}"/> + <copy + overwrite="true" + file="${wtp.builder.home}/distribution/${build.distribution}.site/templateFiles/components.template.php" + tofile="${resultDir}/components/components.php"/> + <antcall target="countFiles"/> + <antcall target="generateCompileIndex"/> + <antcall target="generateJUnitTestsIndex"/> + <antcall target="getStaticFiles"/> + </target> + <target name="generateCompileIndex"> + <!-- + <taskdef name="indexResults" + classname="org.eclipse.wtp.releng.tools.ResultsSummaryGenerator" + /> + --> + <!-- + 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 + name="dependency.properties" + value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> + <available + file="${dependency.properties}" + property="dependency.properties.exists"/> + <fail + message="dependency file not found: ${dependency.properties}" + unless="dependency.properties.exists"/> + + <!-- create tables of test plugin compiles first --> + <antcall target="generateTestCompileOutput"> + <param + name="outputDirectory" + value="${resultDir}/testcompilelogs"/> + </antcall> + + <!-- create table of code plugins compiles --> + <antcall target="generateCompileOutput"> + <param + name="outputDirectory" + value="${resultDir}/compilelogs"/> + </antcall> + <tstamp> + <format + property="TODAY" + pattern="MMMM d, yyyy"/> + </tstamp> + + <!-- Insert Build Type descriptor --> + <antcall target="${buildType}"/> + <antcall target="writeData"/> + <!-- + Update timestamp on file to permit overwrite through Ant + copy task + --> + <touch file="${resultingIndex}"/> + </target> + <target + name="generateTestCompileOutput" + depends="checkIfCompileLogs" + if="doCompileLogs"> + <summarizeResults + isBuildTested="false" + includeAll="true" + dropTokenList="${dropTokenList}" + xmlDirectoryName="" + dropDirectoryName="${resultDir}" + testResultsTemplateFileName="${templateDir}/templateFiles/testCompileResults.php.template" + testResultsHtmlFileName="testCompileResults.php" + hrefTestResultsTargetPath="" + hrefCompileLogsTargetPath="testcompilelogs" + compileLogsDirectoryName="${outputDirectory}"/> + <antcall target="compilerXMLToHTML"/> + </target> + <target + name="generateCompileOutput" + depends="checkIfCompileLogs" + if="doCompileLogs"> + <summarizeResults + isBuildTested="false" + includeAll="true" + dropTokenList="${dropTokenList}" + xmlDirectoryName="" + dropDirectoryName="${resultDir}" + testResultsTemplateFileName="${templateDir}/templateFiles/compileResults.php.template" + testResultsHtmlFileName="compileResults.php" + hrefTestResultsTargetPath="testResults/html" + hrefCompileLogsTargetPath="compilelogs" + compileLogsDirectoryName="${outputDirectory}"/> + <antcall target="compilerXMLToHTML"/> + </target> + <target name="compilerXMLToHTML"> + <xslt + basedir="${outputDirectory}" + destdir="${outputDirectory}" + includes="**/*.xml" + scanincludeddirectories="true" + style="compilerXMLOutputToHTML.xsl" + force="true"/> + </target> + <target + name="generateJUnitTestsIndex" + depends="checkIfTested" + if="doTests"> + <!-- + 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 + name="dependency.properties" + value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> + <available + file="${dependency.properties}" + property="dependency.properties.exists"/> + <fail + message="dependency file not found: ${dependency.properties}" + unless="dependency.properties.exists"/> + <property file="${dependencies.properties}"/> + + <!-- create table of test plugin compiles first --> + <!-- set isBuildTested to true for the "compile only" results --> + <summarizeResults + isBuildTested="true" + dropTokenList="${dropTokenList}" + dropDirectoryName="${resultDir}" + xmlDirectoryName="${resultDir}/testResults/xml" + testResultsTemplateFileName="${templateDir}/templateFiles/testResults.php.template.php" + testResultsHtmlFileName="testResults.php" + hrefTestResultsTargetPath="testResults/html" + compileLogsDirectoryName=""/> + <tstamp> + <format + property="TODAY" + pattern="MMMM d, yyyy"/> + </tstamp> + + <!-- Insert Build Type descriptor --> + <antcall target="${buildType}"/> + <antcall target="writeData"/> + <!-- + Update timestamp on file to permit overwrite through Ant + copy task + --> + <touch file="${resultingIndex}"/> + </target> + <target name="getStaticFiles"> + <!--get static files required in the buildLabel directory--> + <copy todir="${resultDir}"> + <fileset dir="${templateDir}/staticDropFiles"/> + </copy> + + <!--copy buildnotes from plugin directories--> + <mkdir dir="${resultDir}/buildnotes"/> + <copy + todir="${resultDir}/buildnotes" + flatten="true"> + <fileset + dir="${buildDirectory}/plugins" + includes="**/buildnotes_*.html"/> + <fileset + dir="${buildDirectory}/features" + includes="**/buildnotes_*.html"/> + </copy> + <copy + file="${templateDir}/staticDropFiles/logIndex.php" + tofile="${resultDir}/testResults/consolelogs/full/logIndex.php"/> + <copy + file="${templateDir}/staticDropFiles/logIndex.php" + tofile="${resultDir}/testResults/consolelogs/testLogs/logIndex.php"/> + <copy + file="${templateDir}/staticDropFiles/logIndex.php" + tofile="${resultDir}/testResults/consolelogs/testSysErrorLogs/logIndex.php"/> + </target> + + <target name="countFiles"> + <!-- + files.count is a file that should exist in the drop + directory with a count of the zip files in the same + directory. It is required to generate a link to the build on + the downloads page. + --> + <countBuildFiles + sourceDirectory="${resultDir}" + filterString=".zip,.tar.gz" + outputFile="${resultDir}/files.count"/> + </target> + + <!--Build type descriptors--> + <target name="I"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Integration"/> + </target> + <target name="S"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Stable"/> + </target> + <target name="N"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Nightly"/> + </target> + <target name="M"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Maintenance"/> + </target> + <target name="R"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Release"/> + </target> + <target name="T"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Test"/> + </target> + <target name="P"> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="%wtpandprereqs%" + value=" "/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@type@" + value="Patches"/> + </target> + <target name="checkIfTested"> + <echo + level="debug" + message="isBuildTested: ${isBuildTested}"/> + <condition property="doTests"> + <equals + arg1="${isBuildTested}" + arg2="true" + trim="true" + casesensitive="false"/> + </condition> + </target> + <target name="checkIfCompileLogs"> + <condition property="doCompileLogs"> + <available file="${outputDirectory}"/> + </condition> + <echo message="doCompileLogs: ${doCompileLogs) outputDirectory: ${outputDirectory}"/> + </target> + <target name="writeData"> + <!-- Insert Build Date --> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@date@" + value="${TODAY}"/> + + <!-- Insert Build Name and related information --> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@build@" + value="${buildLabel}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@buildBranch@" + value="${buildBranch}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@build_distribution@" + value="${build.distribution}"/> + + <!-- Insert PreRequsites --> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformFile@" + value="${eclipseplatform.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformURL@" + value="${eclipseplatform.url}/${eclipseplatform.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformBuildURL@" + value="${eclipseplatform.url}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformfilelinux@" + value="${eclipseplatform.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformfilewindows@" + value="${eclipseplatform.file.win32-win32-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformfilemacos@" + value="${eclipseplatform.file.macosx-carbon-ppc}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatformBuildHome@" + value="${eclipseplatform.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatform.mirror.prefixuri@" + value="${eclipseplatform.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseplatform.fspath.prefix@" + value="${eclipseplatform.fspath.prefix}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseFile@" + value="${eclipse.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseURL@" + value="${eclipse.url}/${eclipse.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseBuildURL@" + value="${eclipse.url}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipsefilelinux@" + value="${eclipse.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipsefilewindows@" + value="${eclipse.file.win32-win32-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipsefilemacos@" + value="${eclipse.file.macosx-carbon-ppc}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipseBuildHome@" + value="${eclipse.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipse.mirror.prefixuri@" + value="${eclipse.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipse.fspath.prefix@" + value="${eclipse.fspath.prefix}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@testURL@" + value="${eclipseTestFramework.url}/${eclipseTestFramework.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@testFile@" + value="${eclipseTestFramework.file}"/> + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4File@" + value="${e4.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4URL@" + value="${e4.url}/${eclipse.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4BuildURL@" + value="${e4.url}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4filelinux@" + value="${e4.file.linux-gtk-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4filewindows@" + value="${e4.file.win32-win32-x86}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4filemacos@" + value="${e4.file.macosx-carbon-ppc}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4BuildHome@" + value="${e4.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4.mirror.prefixuri@" + value="${e4.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@e4.fspath.prefix@" + value="${e4.fspath.prefix}"/> + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfName@" + value="${emf.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfDescription@" + value="${emf.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfFile@" + value="${emf.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfURL@" + value="${emf.url}/${emf.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfBuildHome@" + value="${emf.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emf.mirror.prefixuri@" + value="${emf.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsourceURL@" + value="${emfsourcedoc.url}/${emfsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsourceFile@" + value="${emfsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsourceName@" + value="${emfsourcedoc.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsourceDescription@" + value="${emfsourcedoc.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsourceBuildHome@" + value="${emfsourcedoc.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfsource.mirror.prefixuri@" + value="${emfsourcedoc.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsourceURL@" + value="${emfxsdsourcedoc.url}/${emfxsdsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsourceFile@" + value="${emfxsdsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsourceName@" + value="${emfxsdsourcedoc.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsourceDescription@" + value="${emfxsdsourcedoc.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsourceBuildHome@" + value="${emfxsdsourcedoc.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdsource.mirror.prefixuri@" + value="${emfxsdsourcedoc.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdFile@" + value="${emfxsd.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdName@" + value="${emfxsd.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdDescription@" + value="${emfxsd.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdURL@" + value="${emfxsd.url}/${emfxsd.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsdBuildHome@" + value="${emfxsd.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfxsd.mirror.prefixuri@" + value="${emfxsd.mirror.prefixuri}"/> + + + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsourceURL@" + value="${emfandxsdsourcedoc.url}/${emfandxsdsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsourceFile@" + value="${emfandxsdsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsourceName@" + value="${emfandxsdsourcedoc.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsourceDescription@" + value="${emfandxsdsourcedoc.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsourceBuildHome@" + value="${emfandxsdsourcedoc.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdsource.mirror.prefixuri@" + value="${emfandxsdsourcedoc.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdFile@" + value="${emfandxsd.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdRepo@" + value="${emfandxsd.repo}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdName@" + value="${emfandxsd.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdDescription@" + value="${emfandxsd.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdURL@" + value="${emfandxsd.url}/${emfandxsd.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsdBuildHome@" + value="${emfandxsd.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfandxsd.mirror.prefixuri@" + value="${emfandxsd.mirror.prefixuri}"/> + + + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationFile@" + value="${emfvalidation.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationURL@" + value="${emfvalidation.url}/${emfvalidation.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationBuildHome@" + value="${emfvalidation.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidation.mirror.prefixuri@" + value="${emfvalidation.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationName@" + value="${emfvalidation.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationDescription@" + value="${emfvalidation.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsourceFile@" + value="${emfvalidationsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsourceURL@" + value="${emfvalidationsourcedoc.url}/${emfvalidationsourcedoc.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsourceBuildHome@" + value="${emfvalidationsourcedoc.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsource.mirror.prefixuri@" + value="${emfvalidationsourcedoc.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsourceName@" + value="${emfvalidationsourcedoc.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@emfvalidationsourceDescription@" + value="${emfvalidationsourcedoc.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wstName@" + value="${wst.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wstDescription@" + value="${wst.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wstFile@" + value="${wst.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wstURL@" + value="${wst.url}/${wst.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wstBuildHome@" + value="${wst.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wst.mirror.prefixuri@" + value="${wst.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jstName@" + value="${jst.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jstDescription@" + value="${jst.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jstFile@" + value="${jst.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jstURL@" + value="${jst.url}/${jst.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jstBuildHome@" + value="${jst.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jst.mirror.prefixuri@" + value="${jst.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpName@" + value="${wtp.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpDescription@" + value="${wtp.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpFile@" + value="${wtp.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpRepo@" + value="${wtp.repo}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpURL@" + value="${wtp.url}/${wtp.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtpBuildHome@" + value="${wtp.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtp.mirror.prefixuri@" + value="${wtp.mirror.prefixuri}"/> + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptestsName@" + value="${wtptests.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptestsDescription@" + value="${wtptests.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptestsFile@" + value="${wtptests.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptestsURL@" + value="${wtptests.url}/${wtptests.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptestsBuildHome@" + value="${wtptests.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@wtptests.mirror.prefixuri@" + value="${wtptests.mirror.prefixuri}"/> + + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefFile@" + value="${gef.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefRepo@" + value="${gef.repo}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefURL@" + value="${gef.url}/${gef.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefBuildHome@" + value="${gef.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gef.mirror.prefixuri@" + value="${gef.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefName@" + value="${gef.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@gefDescription@" + value="${gef.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipserelengFile@" + value="${eclipsereleng.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@eclipserelengURL@" + value="${eclipsereleng.url}/${eclipsereleng.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@orbitthirdpartyzipFile@" + value="${orbitthirdpartyzip.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@orbitthirdpartyzipURL@" + value="${orbitthirdpartyzip.url}/${orbitthirdpartyzip.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@orbitthirdpartyzipBuildHome@" + value="${orbitthirdpartyzip.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@orbitthirdpartyzip.mirror.prefixuri@" + value="${orbitthirdpartyzip.mirror.prefixuri}"/> + + + <!-- no longer used. Post 1.5.5 --> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jemFile@" + value="${jem.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jemURL@" + value="${jem.url}/${jem.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jemBuildHome@" + value="${jem.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@jem.mirror.prefixuri@" + value="${jem.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpFile@" + value="${dtp.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpRepo@" + value="${dtp.repo}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpURL@" + value="${dtp.url}/${dtp.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpBuildHome@" + value="${dtp.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtp.mirror.prefixuri@" + value="${dtp.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpName@" + value="${dtp.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dtpDescription@" + value="${dtp.description}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltkFile@" + value="${dltk.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltkURL@" + value="${dltk.url}/${dltk.file}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltkBuildHome@" + value="${dltk.build.home}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltk.mirror.prefixuri@" + value="${dltk.mirror.prefixuri}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltkName@" + value="${dltk.name}"/> + <replace + dir="${resultDir}" + includes="**/*.php,*.xml" + token="@dltkDescription@" + value="${dltk.description}"/> + </target> +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_err.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_err.gif new file mode 100644 index 0000000000000000000000000000000000000000..4f0748abc07d0bfb1843809a7b4cb4ddf6ded917 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_err.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_warn.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_warn.gif new file mode 100644 index 0000000000000000000000000000000000000000..8386e3e02a26c4922cb7ee4f8d978de11617db66 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/access_warn.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/buildNotes.php b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/buildNotes.php new file mode 100644 index 0000000000000000000000000000000000000000..23b289f6b8e122a87010eab4c1716aff9c5dc377 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/buildNotes.php @@ -0,0 +1,59 @@ +<html> +<head> + +<?php +$parts = explode("/", getcwd()); +$parts2 = explode("-", $parts[count($parts) - 1]); +$buildName = $parts2[1]; + +echo "<title>Build Notes 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">Build Notes</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"> Build Notes for <?php echo "$buildName"; ?> + </font> + </b> + </td> + </tr> + </table> + <table border="0"> + + + <?php + $hasNotes = false; + $aDirectory = dir("buildnotes"); + while ($anEntry = $aDirectory->read()) { + if ($anEntry != "." && $anEntry != "..") { + $nameprefixlen=strlen("buildnotes_"); + $baseName = substr($anEntry,$nameprefixlen); + $extpos=strrpos($baseName,".html"); + $component=substr($baseName,0,$extpos); + $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> +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_err.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_err.gif new file mode 100644 index 0000000000000000000000000000000000000000..c2bfdd606b59240410feb5ce0f1dc8ec7c7f35e3 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_err.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_warn.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_warn.gif new file mode 100644 index 0000000000000000000000000000000000000000..cf4fdf93c71b7ab2cb28dfd06fed9c563fa29214 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/compile_warn.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/consoleLogs.php b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/consoleLogs.php new file mode 100644 index 0000000000000000000000000000000000000000..e57cfaac46f60111fc266df97a706de6b9e54ba1 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/consoleLogs.php @@ -0,0 +1,101 @@ +<html> +<head> + +<?php +$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 + $rootDir = "testResults/consolelogs"; + $hasNotes = false; + $aDirectory = dir($rootDir); + $index = 0; + $dirindex = 0; + while ($anEntry = $aDirectory->read()) { + if ($anEntry != "." && $anEntry != "..") { + if (is_file("$rootDir/$anEntry")) { + $entries[$index] = $anEntry; + $index++; + } else if (is_dir("$rootDir/$anEntry")) { + $direntries[$dirindex] = $anEntry; + $dirindex++; + } + } + } + $aDirectory->close(); + + + sort($entries); + sort($direntries); + + for ($i = 0; $i < $dirindex; $i++) { + $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> +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/junit_err.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/junit_err.gif new file mode 100644 index 0000000000000000000000000000000000000000..1b7ff9de097c6edf4a1f8bea018859942d04bb65 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/junit_err.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/logIndex.php b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/logIndex.php new file mode 100644 index 0000000000000000000000000000000000000000..7559c16b1f8c581374e4a227d076547410ca50e6 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/logIndex.php @@ -0,0 +1,92 @@ +<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> diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/miscUtil.php b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/miscUtil.php new file mode 100644 index 0000000000000000000000000000000000000000..540468b18b68ba89610887c3645054cff60bb421 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/miscUtil.php @@ -0,0 +1,292 @@ +<?php + +// todo: unsure if can handle filenames that are URLs? +// handy constant to compute file size in megabytes + +include_once('buildvariables.php'); + + +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"; + if (file_exists($filename)) { + $zipfilesize=filesize($filename); + if ($zipfilesize > $criteria) { + $zipfilesize=round($zipfilesize/$onemeg, 0); + $scaleChar = "M"; + } + else { + $zipfilesize=round($zipfilesize/$onekilo, 0); + $scaleChar = "K"; + } + } + else { + $zipfilesize = 0; + } + $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=\"7%\">"; + echo "[<a href=\"checksum/$filename.md5\">md5</a>][<a href=\"checksum/$filename.sha1\">sha1</a>]"; + echo "</td>"; +} + +/* + * This function needs to add the subdir, if on mirrored server, but not add it if not, +* since assumed the calling page is such that a relative URL (already in subdir) is correct. +*/ +function displayFileLineSubdir($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription) { + echo "<td align=\"right\" valign=\"top\" width=\"30%\">"; + $fullURL=$downloadprefix.$subdir."/".$filename; + if (isMirrored($fullURL)) { + echo "<a href=\"" . $fullURL . "\">" . $fileShortDescription . "</a>"; + } + else { + echo "<a href=\"" . $filename . "\">" . $fileShortDescription . "</a>"; + } + echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">"; + echo $zipfilesize; + echo "</td>"; + echo "<td align=\"right\" valign=\"top\" width=\"7%\">"; + echo "[<a type=\"text/plain\" href=\"checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"checksum/$filename.sha1\">sha1</a>]"; + echo "</td>"; +} + +function displayFileLineWithSHA($downloadprefix, $filename, $zipfilesize, $fileShortDescription) { + echo "<td align=\"right\" valign=\"top\" width=\"15%\">"; + echo "<a href=\"$downloadprefix$filename\">" . $fileShortDescription . "</a>"; + echo "</td><td align=\"right\" valign=\"top\" width=\"2%\">"; + echo $zipfilesize; + echo "</td>"; + echo "<td align=\"right\" valign=\"top\" width=\"7%\">"; + echo "[<a type=\"text/plain\" href=\"checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"checksum/$filename.sha1\">sha1</a>]"; + echo "</td>"; +} + +function displayRepoFileLine($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription) { + echo "<td align=\"right\" valign=\"top\" width=\"30%\">"; + echo "<a href=\"" . $downloadprefix . $subdir . "/" . $filename . "\">" . $fileShortDescription . "</a>"; + echo "</td><td align=\"right\" valign=\"top\" width=\"3%\">"; + echo $zipfilesize; + echo "</td>"; + echo "<td align=\"right\" valign=\"top\" width=\"7%\">"; + echo "[<a type=\"text/plain\" href=\"$subdir/checksum/$filename.md5\">md5</a>][<a type=\"text/plain\" href=\"$subdir/checksum/$filename.sha1\">sha1</a>]"; + echo "</td>"; +} + + +function displayp2repoarchives($zipfilename, $subdir, $downloadprefix, $fileShortDescription, $label, $description) { + + $filename=$zipfilename.".zip"; + $wholepath="./".$subdir."/".$filename; + if (file_exists($wholepath)) { + echo "<tr>"; + + echo "<td align=\"left\" valign=\"top\" width=\"10%\"><b>".$label."</b></td>"; + echo "<td align=\"left\" valign=\"top\">"; + echo "<p>".$description."</p>"; + echo "</td>"; + + $zipfilesize=fileSizeForDisplay($wholepath); + + displayRepoFileLine($downloadprefix, $subdir, $filename, $zipfilesize, $fileShortDescription); + + echo "</tr>"; + } else { + + // debug only + // echo $wholepath."<br/>"; + } + +} + + + +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; +} +?> diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending.gif new file mode 100644 index 0000000000000000000000000000000000000000..66db2a627b7af1993ba6acc7e25ec24f2bf994f5 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending1.gif b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending1.gif new file mode 100644 index 0000000000000000000000000000000000000000..1b2ea6ebcfe9b3acebacfb61f004e105bb6fb502 Binary files /dev/null and b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/pending1.gif differ diff --git a/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/report2.php b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/report2.php new file mode 100644 index 0000000000000000000000000000000000000000..f3e11715c91e49be7129d032b06e8f391887a5b2 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/staticDropFiles/report2.php @@ -0,0 +1,45 @@ + +<?php + +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 & 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; + } + } +} + + +?> + + diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/buildvariables.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/buildvariables.php new file mode 100644 index 0000000000000000000000000000000000000000..3e825b9c96b217ca73a2d4a0eb890c18521efa82 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/buildvariables.php @@ -0,0 +1,220 @@ +<?php + +// this file is for "variables" that are set/created at +// build time, which can then be included or used +// from mulitiple files, by using +// include('buildvariables.php'); + +include_once("miscUtil.php"); + +$incubating="false"; + +$build_distribution="@build_distribution@"; + +$displayBuildNotes=true; + +$buildBranch="@buildBranch@"; +$build="@build@"; +$type="@type@"; +$builddate="@date@"; + +$eclipseMirrorPrefixuri="@eclipse.mirror.prefixuri@"; +$eclipseFSpathPrefix="@eclipse.fspath.prefix@"; + +$eclipsefilelinux="@eclipsefilelinux@"; +$eclipsefilewindows="@eclipsefilewindows@"; +$eclipsefilemacosx="@eclipsefilemacos@"; + +$eclipseURL="@eclipseURL@"; +$eclipseFile="@eclipseFile@"; +$eclipseBuildURL="@eclipseBuildURL@"; +$eclipseBuildHome="@eclipseBuildHome@"; +$eclipseName="@eclipseName@"; +$eclipseDescription="@eclipseDescription@"; + + + +$e4filelinux="@e4filelinux@"; +$e4filewindows="@e4filewindows@"; +$e4filemacosx="@e4filemacos@"; + +$e4URL="@e4URL@"; +$e4File="@4File@"; +$e4BuildURL="@e4BuildURL@"; +$e4BuildHome="@e4BuildHome@"; +$e4Name="@e4Name@"; +$e4Description="@e4Description@"; + + +$eclipseplatformMirrorPrefixuri="@eclipseplatform.mirror.prefixuri@"; +$eclipseplatformFSpathPrefix="@eclipse.fspath.prefix@"; + +$eclipseplatformfilelinux="@eclipseplatformfilelinux@"; +$eclipseplatformfilewindows="@eclipseplatformfilewindows@"; +$eclipseplatformfilemacosx="@eclipseplatformfilemacos@"; + +$eclipseplatformURL="@eclipseplatformURL@"; +$eclipseplatformFile="@eclipseplatformFile@"; +$eclipseplatformBuildURL="@eclipseplatformBuildURL@"; +$eclipseplatformBuildHome="@eclipseplatformBuildHome@"; +$eclipseplatformName="@eclipseplatformName@"; +$eclipseplatformDescription="@eclipseplatformDescription@"; + +$testURL="@testURL@"; +$testFile="@testFile@"; + +$wstURL="@wstURL@"; +$wstFile="@wstFile@"; +$wstMirrorPrefixuri="@wst.mirror.prefixuri@"; +$wstBuildHome="@wstBuildHome@"; +$wstName="@wstName@"; +$wstDescription="@wstDescription@"; + +$jstURL="@jstURL@"; +$jstFile="@jstFile@"; +$jstMirrorPrefixuri="@jst.mirror.prefixuri@"; +$jstBuildHome="@jstBuildHome@"; +$jstName="@jstName@"; +$jstDescription="@jstDescription@"; + +$wtpURL="@wtpURL@"; +$wtpFile="@wtpFile@"; +$wtpRepo="@wtpRepo@"; +$wtpMirrorPrefixuri="@wtp.mirror.prefixuri@"; +$wtpBuildHome="@wtpBuildHome@"; +$wtpName="@wtpName@"; +$wtpDescription="@wtpDescription@"; + +$wtptestsURL="@wtptestsURL@"; +$wtptestsFile="@wtptestsFile@"; +$wtptestsRepo="@wtptestsRepo@"; +$wtptestsMirrorPrefixuri="@wtptests.mirror.prefixuri@"; +$wtptestsBuildHome="@wtptestsBuildHome@"; +$wtptestsName="@wtptestsName@"; +$wtptestsDescription="@wtptestsDescription@"; + +$gefURL="@gefURL@"; +$gefFile="@gefFile@"; +$gefRepo="@gefRepo@"; +$gefMirrorPrefixuri="@gef.mirror.prefixuri@"; +$gefBuildHome="@gefBuildHome@"; +$gefName="@gefName@"; +$gefDescription="@gefDescription@"; + +$emfURL="@emfURL@"; +$emfFile="@emfFile@"; +$emfMirrorPrefixuri="@emf.mirror.prefixuri@"; +$emfBuildHome="@emfBuildHome@"; +$emfName="@emfName@"; +$emfDescription="@emfDescription@"; + +$emfsourceURL="@emfsourceURL@"; +$emfsourceFile="@emfsourceFile@"; +$emfsourceMirrorPrefixuri="@emfsource.mirror.prefixuri@"; +$emfsourceBuildHome="@emfsourceBuildHome@"; +$emfsourceName="@emfsourceName@"; +$emfsourceDescription="@emfsourceDescription@"; + +$emfxsdURL="@emfxsdURL@"; +$emfxsdFile="@emfxsdFile@"; +$emfxsdMirrorPrefixuri="@emfxsd.mirror.prefixuri@"; +$emfxsdBuildHome="@emfxsdBuildHome@"; +$emfxsdName="@emfxsdName@"; +$emfxsdDescription="@emfxsdDescription@"; + +$emfxsdsourceURL="@emfxsdsourceURL@"; +$emfxsdsourceFile="@emfxsdsourceFile@"; +$emfxsdsourceMirrorPrefixuri="@emfxsdsource.mirror.prefixuri@"; +$emfxsdsourceBuildHome="@emfxsdsourceBuildHome@"; +$emfxsdsourceName="@emfxsdsourceName@"; +$emfxsdsourceDescription="@emfxsdsourceDescription@"; + +$emfandxsdURL="@emfandxsdURL@"; +$emfandxsdFile="@emfandxsdFile@"; +$emfandxsdRepo="@emfandxsdRepo@"; +$emfandxsdMirrorPrefixuri="@emfandxsd.mirror.prefixuri@"; +$emfandxsdBuildHome="@emfandxsdBuildHome@"; +$emfandxsdName="@emfandxsdName@"; +$emfandxsdDescription="@emfandxsdDescription@"; + +$emfandxsdsourceURL="@emfandxsdsourceURL@"; +$emfandxsdsourceFile="@emfandxsdsourceFile@"; +$emfandxsdsourceMirrorPrefixuri="@emfandxsdsource.mirror.prefixuri@"; +$emfandxsdsourceBuildHome="@emfandxsdsourceBuildHome@"; +$emfandxsdsourceName="@emfandxsdsourceName@"; +$emfandxsdsourceDescription="@emfandxsdsourceDescription@"; + + +$dtpURL="@dtpURL@"; +$dtpFile="@dtpFile@"; +$dtpRepo="@dtpRepo@"; +$dtpMirrorPrefixuri="@dtp.mirror.prefixuri@"; +$dtpBuildHome="@dtpBuildHome@"; +$dtpName="@dtpName@"; +$dtpDescription="@dtpDescription@"; + +$dltkURL="@dltkURL@"; +$dltkFile="@dltkFile@"; +$dltkMirrorPrefixuri="@dltk.mirror.prefixuri@"; +$dltkBuildHome="@dltkBuildHome@"; +$dltkName="@dltkName@"; +$dltkDescription="@dltkDescription@"; + +$eclipserelengFile="@eclipserelengFile@"; +$eclipserelengURL="@eclipserelengURL@"; +$orbitthirdpartyzipFile="@orbitthirdpartyzipFile@"; +$orbitthirdpartyzipURL="@orbitthirdpartyzipURL@"; +$orbitthirdpartyzipBuildHome="@orbitthirdpartyzipBuildHome@"; +$orbitthirdpartyzipMirrorPrefixuri="@orbitthirdpartyzip.mirror.prefixuri@"; + + +$prereq_eclipse="true"; +$prereq_eclipseplatform="@prereq.eclipseplatform@"; +$prereq_emf="false"; +$prereq_emfxsd="false"; +$prereq_emfandxsd="true"; +$prereq_emfvalidation="@prereq.emfvalidation@"; +$prereq_gef="true"; +$prereq_dtp="true"; +$prereq_wst="@prereq.wst@"; +$prereq_jst="@prereq.jst@"; +$prereq_wtp="true"; +$prereq_wtptests="true"; +$prereq_dltk="@prereq.dltk@"; + + + + + + + +$debugScript = false; +$debugFunctions = false; + +$defaultMirrorScript=""; +$defaultWTPMirrorPrefix="./"; + +$eclipseMirrorScript="http://www.eclipse.org/downloads/download.php?file="; + +// TODO: improve so this hard coding isn't required. +// This depends on the declare script changing webtools/committers to webtools/downloads +// And, the logic is such that if it is not mirrored, this URI is not used at all, just +// a relative reference only +$eclipseWTPMirrorPrefix="/webtools/committers/drops/$buildBranch/$build/"; + + +$mirrorScript=$defaultMirrorScript; +$downloadprefix=$defaultWTPMirrorPrefix; + + +$keytestMirrorString=$eclipseMirrorScript . "${eclipseWTPMirrorPrefix}/${build_distribution}-$build.zip"; +if (isMirrored($keytestMirrorString) ) { + $mirrorScript=$eclipseMirrorScript; + $downloadprefix="${mirrorScript}${eclipseWTPMirrorPrefix}"; +} + +if ($debugScript) { + echo "inferred platform: " . getPlatform(); +} + +?> diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/compileResults.php.template b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/compileResults.php.template new file mode 100644 index 0000000000000000000000000000000000000000..f7857717a9a26e784a2aaa3068f9cf586788c5ec --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/compileResults.php.template @@ -0,0 +1,76 @@ +<html> +<head> + +<?php + $parts = explode("/", getcwd()); + $parts2 = explode("-", $parts[count($parts) - 1]); + $buildName = $parts2[1]; + + echo "<title>Compile Logs: Code Bundles for $buildName</title>"; +?> + +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + +<style> +.bold, .bold TD, .bold TH, .bold TR +{ +font-weight:bold; +} +.numeric, .numeric TD +{ +text-align:right; +padding-right:2%; +} +.normaltable, .normaltable TD, .normaltable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:White; +} +.errorltable, .errortable TD, .errortable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:Red; +font-weight:bold; +} +.warningtable, .warningtable TD, .warningtable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:khaki; +} +.extraWarningTable, .extraWarningTable TD, .extraWarningTable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:Yellow; +} +</style> +</head> +<body> + +<?php + echo "<h1>Compile Logs: Code Bundles for $buildName</h1>"; +?> + + +<table id=tabledata align = "center" width="75%" border="1"> + <tr> + <td class="bold" align="center">Compile Logs</td> + <td class="bold" align="center">Compile Errors</td> + <td class="bold" align="center">Compiler Warnings</td> + <td class="bold" align="center">Access Violations</td> + <td class="bold" align="center">Access Warnings</td> + </tr> + + %compilelogs% + +</table> + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/components.template.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/components.template.php new file mode 100644 index 0000000000000000000000000000000000000000..f53c0231250faa2c9493d13274556df89e7267a9 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/components.template.php @@ -0,0 +1,102 @@ +<html> +<head> + + +<?php +//ini_set("display_errors", "true"); +//error_reporting (E_ALL); + +include("../miscUtil.php"); +include("../buildvariables.php"); + +// todo: could use some index array of general descriptions in future +$known_component_prefixes = array(); +$known_component_prefixes[]="wtp-jaxws"; +$known_component_prefixes[]="wtp-common-fproj"; + + +echo "<title>Components from build </title> \n"; +?> + +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + +<style> +.bold,.bold TD,.bold TH,.bold TR { + font-weight: bold; +} +</style> + + +</head> +<body> + <p> + <b><font face="Verdana" size="+3">Components</font> + </b> + </p> + <p>These are special-purpose subsets of the WTP build. They are not + needed for normal use or construction of WTP (if they are needed, they + are already included in other zip files or repositories). These are + provided here by special request of committers, for custom + distribtions or tests.</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 subsets</font> + </b> + </td> + </tr> + </table> + + + +<?php + +// Assuse this file is in the directory we are interested in +$dir = dir(getcwd()); + +//echo "dir: " . $dir->path . "<br /> \n"; +while ($anEntry = $dir->read()) +{ + + echo "<table>"; + + if ($anEntry != "." && $anEntry != ".." && is_file($anEntry)) + + { + + $path_parts = pathinfo($anEntry); + $file_extension = $path_parts['extension']; + + if ("zip" === $file_extension) { + // echo " path parts: " . print_r($path_parts) . "<br /> \n"; + + echo "<tr>\n"; + + echo "<td align=\"left\" valign=\"top\" width=\"10%\"></td>\n"; + // todo: could use indexed general description here? + //echo " <td align=\"left\" valign=\"top\">\n"; + //echo " <p>The Automated Test zip contains the unit tests.</p>\n"; + + $zipfilename=$path_parts['basename']; + + $filename=$zipfilename; + $zipfilesize=fileSizeForDisplay($filename); + $fileShortDescription=$zipfilename; + displayFileLineSubdir($downloadprefix, "components", $filename, $zipfilesize, $fileShortDescription); + + echo "</tr>\n"; + + + + } + + + } + echo "</table>"; +} + +?> + + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/displayPrereqs.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/displayPrereqs.php new file mode 100644 index 0000000000000000000000000000000000000000..921186a11d446744d08ebff1c3a317b146fdfcf2 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/displayPrereqs.php @@ -0,0 +1,400 @@ +<!-- *********** Required Prerequisites ************** --> +<table border=0 cellspacing=2 cellpadding=2 width="100%"> + <tr> + <td align="left" valign="top" bgcolor="#0080C0"><font + face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Prerequisites + and Handy Extras</font></td> + </tr> + <tr> + <td> + <p>These are the prerequisites to build or run these packages. All + are not necessarily required, but instead some subset. Also listed + are some frequently needed links for committer-required packages + when creating new development environments, or targets to run + against.</p> + <p> + Note that WTP requires Java 5 or higher (and, for some things, + actually requires a JDK rather than only a JRE) even though many + other <a href="http://www.eclipse.org/downloads/">Eclipse Projects</a> + can run with <a + href="http://www.eclipse.org/downloads/moreinfo/jre.php">other JRE + levels</a>. + </p> + <p></p> + </td> + </tr> + <tr> + <td> + <table border=0 cellspacing=1 cellpadding=1 width="90%" + align="center"> + + + + <?php + if ("true" === $prereq_eclipseplatform) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td width=\"40%\">Eclipse Platform</td>"; + + + //customize page depending on user's browser/platform, if we can detect it + $usersPlatform = getPlatform(); + // assume windows by default, since likely most frequent, even for cases where + // platform is "unknown". I've noticed Opera reports 'unknown' :( + $recommendedFile=$eclipseplatformfilewindows; + if (strcmp($usersPlatform,"linux")== 0) { + $recommendedFile=$eclipseplatformfilelinux; + } else if (strcmp($usersPlatform,"mac") == 0) { + $recommendedFile=$eclipseplatformfilemacosx; + } + + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipseURL, $recommendedFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $eclipseplatformBuildURL . "\">appropriate platform</a>"; + echo " or <a href=\"" . $eclipseplatformBuildHome . "\">equivalent</a></td>"; + + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_eclipse) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td width=\"40%\">Eclipse SDK (Platform, JDT)</td>"; + + + //customize page depending on user's browser/platform, if we can detect it + $usersPlatform = getPlatform(); + // assume windows by default, since likely most frequent, even for cases where + // platform is "unknown". I've noticed Opera reports 'unknown' :( + $recommendedFile=$eclipsefilewindows; + if (strcmp($usersPlatform,"linux")== 0) { + $recommendedFile=$eclipsefilelinux; + } else if (strcmp($usersPlatform,"mac") == 0) { + $recommendedFile=$eclipsefilemacosx; + } + + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipseURL, $recommendedFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $eclipseBuildURL . "\">appropriate platform</a>"; + echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>"; + + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_emf) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $emfName . " " . $emfDescription ; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfMirrorPrefixuri, $emfURL, $emfFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfBuildHome . "\">equivalent</a></td>"; + echo " </tr>"; + } + ?> + + + + + <?php + if ("true" === $prereq_emfxsd) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $emfxsdName . " " . $emfxsdDescription ; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfxsdMirrorPrefixuri, $emfxsdURL, $emfxsdFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfxsdBuildHome . "\">equivalent</a></td>"; + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_emfandxsd) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $emfandxsdName . " " . $emfandxsdDescription ; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfandxsdMirrorPrefixuri, $emfandxsdURL, $emfandxsdFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfandxsdBuildHome . "\">equivalent</a></td>"; + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_emfvalidation) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $emfvalidationName . " " . $emfvalidationDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfvalidationMirrorPrefixuri, $emfvalidationURL, $emfvalidationFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfvalidationBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_gef) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $gefName . " " . $gefDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $gefMirrorPrefixuri, $gefURL, $gefFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $gefBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_dtp) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $dtpName . " " . $dtpDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $dtpMirrorPrefixuri, $dtpURL, $dtpFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $dtpBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_wst) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $wstName . " " . $wstDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $wstMirrorPrefixuri, $wstURL, $wstFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $wstBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + + <?php + if ("true" === $prereq_jst) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $jstName . " " . $jstDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $jstMirrorPrefixuri, $jstURL, $jstFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $jstBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + <?php + if ("true" === $prereq_wtp) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $wtpName . " " . $wtpDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $wtpMirrorPrefixuri, $wtpURL, $wtpFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $wtpBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + + <?php + if ("true" === $prereq_wtptests) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $wtptestsName . " " . $wtptestsDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $wtptestsMirrorPrefixuri, $wtptestsURL, $wtptestsFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $wtptestsBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + + <?php + if ("true" === $prereq_dltk) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + + echo $dltkName . " " . $dltkDescription; + + echo "</td>"; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $dltkMirrorPrefixuri, $dltkURL, $dltkFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $dltkBuildHome . "\">equivalent</a></td>"; + + echo " </tr>"; + } + ?> + <tr valign="middle"> + <td width="10%"></td> + <td colspan="2"> + <hr /></td> + </tr> + + + + + + <?php + if ("true" === $prereq_emf) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + echo $emfsourceName . " " . $emfsourceDescription; + echo "</td> "; + echo "<td align=\"right\">"; + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfsourceMirrorPrefixuri, $emfsourceURL, $emfsourceFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfsourceBuildHome . "\">equivalent</a></td>"; + echo "</tr>"; + } + ?> + <?php + if ("true" === $prereq_emfxsd) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + echo $emfxsdsourceName . " " . $emfxsdsourceDescription; + echo "</td> "; + echo "<td align=\"right\">"; + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfxsdsourceMirrorPrefixuri, $emfxsdsourceURL, $emfxsdsourceFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfxsdsourceBuildHome . "\">equivalent</a></td>"; + echo "</tr>"; + } + ?> + + <?php + if ("true" === $prereq_emfvalidation) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + echo $emfvalidationsourceName . " " . $emfvalidationsourceDescription; + echo "</td> "; + echo "<td align=\"right\">"; + echo getPrereqReferenceOrName($eclipseMirrorScript, $emfvalidationsourceMirrorPrefixuri, $emfvalidationsourceURL, $emfvalidationsourceFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $emfvalidationsourceBuildHome . "\">equivalent</a></td>"; + echo "</tr>"; + } + ?> + + <?php + if (true) { + echo "<tr valign=\"top\">"; + echo "<td width=\"10%\"></td>"; + echo "<td>"; + echo "Eclipse Test Framework (required only for Automated JUnit tests)"; + echo "</td> "; + echo "<td align=\"right\">"; + + echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $testURL, $testFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>"; + echo "</tr>"; + } + ?> + + + <tr valign="top"> + <td width="10%"></td> + <td>Eclipse releng tool (required only for committers to more easily + "release" code to a build)</td> + <td align="right"><?php + echo getPrereqReferenceOrName($eclipseMirrorScript, $eclipseMirrorPrefixuri, $eclipserelengURL, $eclipserelengFile, $eclipseFSpathPrefix); + echo " or <a href=\"" . $eclipseBuildHome . "\">equivalent</a></td>"; + ?> + + </tr> + + <tr valign="top"> + <td width="10%"></td> + <td>Third Party code from Orbit. Not required and is currently much + more than needed for WTP, but some committers like using to create a + PDE target.</td> + <td align="right"><?php + echo getPrereqReferenceOrName($eclipseMirrorScript, $orbitthirdpartyzipMirrorPrefixuri, $orbitthirdpartyzipURL, $orbitthirdpartyzipFile,$eclipseFSpathPrefix); + echo " or <a href=\"" . $orbitthirdpartyzipBuildHome . "\">equivalent</a></td>"; + ?> + + </tr> + + </table> + </td> + </tr> +</table> + diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/headingIntro.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/headingIntro.php new file mode 100644 index 0000000000000000000000000000000000000000..b42f64dedda7c2246747caadb0e157f275d10f44 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/headingIntro.php @@ -0,0 +1,83 @@ + +<?php + +if (isset($incubating) && ($incubating == "true")) { + echo '<title>WTP Incubator Downloads</title>'; +} +else { + echo '<title>WTP Downloads</title>'; +} + +?> + + +</head> + +<body> + + + + + +<?php if (isset($incubating) && ($incubating == "true")) { + echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH=\"100%\">"; + echo " <tr>"; + echo " <td ALIGN=left><font face=\"'Bitstream Vera',Helvetica,Arial\" size=\"+2\"><b><?php echo \"$type\";?>"; + echo " Build: $build</b></font></td>"; + echo " <td align=\"right\" rowspan=\"3\"><a"; + echo " href=\"http://www.eclipse.org/projects/what-is-incubation.php\"><img"; + echo " src=\"http://www.eclipse.org/images/egg-incubation.png\""; + echo " alt=\"Incubation\" align=\"middle\" border=\"0\"></a></td>"; + + + echo " <tr valign=\"top\">"; + echo " <td><font size=\"-1\">" . $builddate . "</font></td>"; + echo " </tr>"; + echo " <tr valign=\"top\">"; + echo " <td>"; + echo " <p>The Eclipse Web Tools Platform (WTP) Incubator Project provides"; + echo " tools for development that are just getting started, or are"; + echo " experimental in some fashion.</p>"; + echo " </td>"; + echo " </tr>"; + echo "</table>"; + +} else { + + echo "<table BORDER=0 CELLSPACING=2 CELLPADDING=2 WIDTH=\"100%\">"; + echo " <tr>"; + echo " <td ALIGN=left><font face=\"'Bitstream Vera',Helvetica,Arial\" size=\"+2\"><b>$type"; + echo " Build: " . $build . "</b></font></td>"; + + echo " <tr valign=\"top\">"; + echo " <td><font size=\"-1\">" . $builddate . "</font></td>"; + echo " </tr>"; + echo " <tr valign=\"top\">"; + echo " <td>"; + echo " <p>The Eclipse Web Tools Platform Project provides tools for Web"; + echo " Development, and is a platform for adopters making add-on tools for"; + echo " Web Development.</p>"; + echo " </td>"; + echo " </tr>"; + echo "</table>"; + +} ?> + + + <table border=0 cellspacing=2 cellpadding=2 width="100%"> + <tr> + <td align="left" valign="top" bgcolor="#0080C0"><font + face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">All-in-one + Packages</font></td> + </tr> + <tr> + <td> + <p> + For most uses, we recommend web-developers download the + "all-in-one" package, <a href="http://www.eclipse.org/downloads/">Eclipse + IDE for Java EE Developers</a>, from the main Eclipse download + site. + </p> + </td> + </tr> + </table> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/index.html.template.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/index.html.template.php new file mode 100644 index 0000000000000000000000000000000000000000..87853f28f9a0f7e7848ceeaef6f6bd35484bb39c --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/index.html.template.php @@ -0,0 +1,377 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + + + +<?php + +//ini_set("display_errors", "true"); +//error_reporting (E_ALL); + +include_once("miscUtil.php"); +include_once('buildvariables.php'); + +// our summary results handling requires php 5 (for simple xml file loading) +// so, if not php 5, just don't display any summary results +// This was found to be required, since some mirror our whole site (e.g. IBM) +// and not all mirrors use PHP 5 +$displayTestSummary=false; +if (phpversion() >= 5) { + + $code_totalBundles=0; + $code_totalErrors=0; + $code_totalWarnings=0; + $code_totalforbiddenAccessWarningCount=0; + $code_totaldiscouragedAccessWarningCount=0; + + $test_totalBundles=0; + $test_totalErrors=0; + $test_totalWarnings=0; + $test_totalforbiddenAccessWarningCount=0; + $test_totaldiscouragedAccessWarningCount=0; + + + $displayTestSummary=true; + // expecting grandTotalErrors and grandTotalTests + $filename = "unitTestsSummary.xml"; + if (file_exists($filename)) { + $prefix = "unitTests_"; + $unitTestsSummary = simplexml_load_file($filename); + foreach ($unitTestsSummary->summaryItem as $summaryItem) { + $name = $summaryItem->name; + $value = $summaryItem->value; + $code= "\$" . $prefix . $name . " = " . $value . ";"; + //echo "<br />code: " . $code; + eval($code); + } + } + + $filename = "compilelogsSummary.xml"; + if (file_exists($filename)) { + $prefix = "code_"; + $compileSummary = simplexml_load_file($filename); + foreach ($compileSummary->summaryItem as $summaryItem) { + $name = $summaryItem->name; + $value = $summaryItem->value; + $code= "\$" . $prefix . $name . " = " . $value . ";"; + //echo "<br />code: " . $code; + eval($code); + } + } + + $filename = "testcompilelogsSummary.xml"; + if (file_exists($filename)) { + $prefix = "test_"; + $compileSummary = simplexml_load_file($filename); + foreach ($compileSummary->summaryItem as $summaryItem) { + $name = $summaryItem->name; + $value = $summaryItem->value; + $code= "\$" . $prefix . $name . " = " . $value . ";"; + //echo "<br />code: " . $code; + eval($code); + } + } +} + + +?> + +<?php include 'headingIntro.php';?> + + +<?php include 'displayPrereqs.php';?> + +<!-- *********** P2 Zips ************** --> + + + +<table border=0 cellspacing=2 cellpadding=2 width="100%"> + <tr> + <td align=left valign=top colspan="2" bgcolor="#0080C0"><font + face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">P2 + repositories in zipped format files.</font></td> + </tr> + + <tr> + <td align="left" valign="top" colspan="5"> + <p>These are archive versions of P2 repositories that can be + downloaded and installed into a development environment or PDE target. + Its is recommended to install, rather than to to unzip the traditional + packages, since it is more informative of missing prerequites or + conflicting dependencies.</p> + </td> + </tr> + + <tr> + <td> + <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center"> + + <?php + + $shortname=${build_distribution}."-repo"; + + $zipfilename=${shortname}."-".${build}; + $filename=${zipfilename}.".zip"; + if (file_exists($filename)) { + ?> + <tr> + <td align="left" valign="top" width="10%"><b>Code Repository</b></td> + <td align="left" valign="top"> + <p>Archived p2 repository of WTP code. Good for product builders. </p> + </td> + <?php + $zipfilesize=fileSizeForDisplay($filename); + + displayFileLine($downloadprefix, $filename, $zipfilesize, $shortname); + ?> + </tr> + <?php } ?> + <?php + + $shortname="${build_distribution}-tests-repo"; + + $zipfilename=$shortname."-".$build; + $filename=$zipfilename.".zip"; + if (file_exists($filename)) { + ?> + <tr> + <td align="left" valign="top" width="10%"><b>Tests Repository</b></td> + <td align="left" valign="top"> + <p>Archived p2 repository of WTP unit tests.</p> + </td> + <?php + $zipfilesize=fileSizeForDisplay($filename); + + displayFileLine($downloadprefix, $filename, $zipfilesize, $shortname); + ?> + </tr> + <?php } ?> + + + </table> + + </tr> +</table> + + +<!-- *********** Traditional Zips ************** --> +<table border=0 cellspacing=2 cellpadding=2 width="100%"> + <tr> + <td align=left valign=top colspan="5" bgcolor="#0080C0"><font + face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF"> Traditional + Zip Files</font></td> + </tr> + + <tr> + <td align="left" valign="top" colspan="5"><?php + $zipbellwether_name="${build_distribution}-${build}.zip"; + if (file_exists($zipbellwether_name)) { + // if-then-include section + // include this whole section if (and only if) the bellwether file exists. + // For example, may not have been created yet + ?> + + <p>The Zip files includes the features and plugins for this build.</p> + <p>Note: These traditional zip files should be considered deprecated, + in favor of installing the archived P2 repositories. The tradtional + zip files may eventually no longer be provided.</p> + <?php } else { ?> + <p>The traditonal zip files have not been produced yet (or, perhaps, + the build failed or was cancelled). Check back in few minutes.</p> + <?php } ?></td> + </tr> + <tr> + <td> + <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center"> + + <?php + $zipfilename="${build_distribution}-${build}"; + $filename=$zipfilename.".zip"; + if (file_exists($filename)) { + ?> + <tr> + <td align="left" valign="top" width="10%"><b>Minimal</b></td> + <td align="left" valign="top"> + <p>Executable code only.</p> + </td> + <?php + $zipfilesize=fileSizeForDisplay($filename); + $fileShortDescription=${build_distribution}; + displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription); + ?> + </tr> + <?php } ?> + + <?php + $zipfilename="${build_distribution}-sdk-${build}"; + $filename=$zipfilename.".zip"; + if (file_exists($filename)) { + ?> + <tr> + <td align="left" valign="top" width="10%"><b>SDK</b></td> + <td align="left" valign="top"> + <p>Executable code and source code.</p> + </td> + <?php + $zipfilesize=fileSizeForDisplay($filename); + $fileShortDescription=${build_distribution} . "-sdk"; + displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription); + ?> + </tr> + <?php } ?> + + <?php + $zipfilename="${build_distribution}-tests-${build}"; + $filename=$zipfilename.".zip"; + if (file_exists($filename)) { + ?> + <tr> + <td align="left" valign="top" width="10%"><b>Unit Tests</b></td> + <td align="left" valign="top"> + <p>The automated test zip contains unit tests.</p> + </td> + <?php + $zipfilesize=fileSizeForDisplay($filename); + $fileShortDescription=${build_distribution} . "-tests"; + displayFileLine($downloadprefix, $filename, $zipfilesize, $fileShortDescription); + ?> + </tr> + <?php } ?> + </table> + </td> + + + </tr> + +</table> + + + + + + +<!-- *********** Build Status ************** --> +<table border=0 cellspacing=2 cellpadding=2 width="100%"> + <tr> + <td align=left valign=top bgcolor="#0080C0"><font + face="'Bitstream Vera',Helvetica,Arial" color="#FFFFFF">Status, tests + and other interesting details</font></td> + </tr> + <tr> + <td> + <table border=0 cellspacing=2 cellpadding=2 width="90%" align="center"> + + <tr> + <td><?php + if (isset($displayBuildNotes) && $displayBuildNotes) { + echo "<a href=\"buildNotes.php\">Build notes</a> <br />"; + } + ?> <a href="directory.txt">map files</a> <br /> + <?php + + if (file_exists("components")) { + echo "<a href=\"components/components.php\">Misc Components</a> <br />\n"; + } + + + if ($displayTestSummary) { + + + if (isset($unitTests_grandTotalErrors)) { + $errorColor="green"; + if ($unitTests_grandTotalErrors > 0) { + $errorColor="red"; + } + echo "<a href=\"testResults.php\">Unit test results</a> "; + echo "<img src=\"junit_err.gif\"/><font color=\"" . $errorColor . "\">" . $unitTests_grandTotalErrors . "</font> Total: " . $unitTests_grandTotalTests; + } + else { + $compileProblemMarkerFile="compilationProblems.txt"; + if (file_exists($compileProblemMarkerFile)) { + echo "<br /> <img src=\"compile_err.gif\"/> No unit tests available. The remaining build and tests were canceled since compilation problems were found. Check compiler output summaries."; + } else { + $installLogName="p2DirectorInstall.log.txt"; + if (file_exists($installLogName)) { + echo "<br /><img src=\"compile_err.gif\"/> No unit tests available. See <a href=\"" . $installLogName . "\">the p2Director install log file </a>from failed test installation attempt"; + } else { + $noTestsProvidedMarkerFile="noTestsProvided.txt"; + if (file_exists($noTestsProvidedMarkerFile)) { + echo "<br /><img src=\"compile_warn.gif\"/> No unit tests available. This build component does not providing any unit tests."; + } else { + + // we may really be pending (tests still running) or maybe they failed in unexpted way?. + echo "<br /><font color=\"orange\">Unit tests ae pending, or otherwise don't exists, or there is an unanticipated build error.</font>"; + + } + } + } + } + + echo "<br />"; + + echo "<br />"; + echo "<a href=\"compileResults.php\">Compile logs: Code Bundles</a>"; + + echo " ($code_totalBundles) "; + echo "<img src=\"compile_err.gif\"/><font color=red>$code_totalErrors</font> "; + echo "<img src=\"compile_warn.gif\"/><font color=orange>$code_totalWarnings</font> "; + echo "<img src=\"access_err.gif\"/><font color=red>$code_totalforbiddenAccessWarningCount</font> "; + echo "<img src=\"access_warn.gif\"/><font color=orange>$code_totaldiscouragedAccessWarningCount</font> "; + + echo "<br />"; + echo "<a href=\"testCompileResults.php\">Compile logs: Test Bundles</a>"; + + echo " ($test_totalBundles) "; + echo "<img src=\"compile_err.gif\"/><font color=red>$test_totalErrors</font> "; + echo "<img src=\"compile_warn.gif\"/><font color=orange>$test_totalWarnings</font> "; + echo "<img src=\"access_err.gif\"/><font color=red>$test_totalforbiddenAccessWarningCount</font> "; + echo "<img src=\"access_warn.gif\"/><font color=orange>$test_totaldiscouragedAccessWarningCount</font> "; + + $logname="antBuilderOutput.log"; + if (file_exists($logname)) { + echo "<br /> <a href=\"".$logname."\" type=\"text/plain\">Full Log</a> from build ". fileSizeForDisplay($logname); + } + + + } + + ?> <br /> + + <?php + if (file_exists("versioningReportName.php")) { + include "versioningReportName.php"; + $fname="${versionReportFilename}.html"; + if (file_exists($fname)) { + echo "<br /> <a href='$fname'>Versioning Information</a>"; + } +} +?></td> + </tr> + </table> + </td> + </tr> +</table> + + + +<!-- footer --> +<center> +<hr> +<p>All downloads are provided under the terms and conditions of the <a + href="http://www.eclipse.org/legal/notice.html">Eclipse.org Software +User Agreement</a> unless otherwise specified.</p> + +<p>If you have problems downloading the drops, contact the <font + face="'Bitstream Vera',Helvetica,Arial" size="-1"><a + href="mailto:webmaster@eclipse.org">webmaster</a></font>.</p> + +</center> +<!-- end footer --> + + + + + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testCompileResults.php.template b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testCompileResults.php.template new file mode 100644 index 0000000000000000000000000000000000000000..42d6f65442f89103b98aac67aeb8d6552abd8516 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testCompileResults.php.template @@ -0,0 +1,76 @@ +<html> +<head> + +<?php + $parts = explode("/", getcwd()); + $parts2 = explode("-", $parts[count($parts) - 1]); + $buildName = $parts2[1]; + + echo "<title>Compile Logs: Test Bundles for $buildName</title>"; +?> + +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + +<style> +.bold, .bold TD, .bold TH, .bold TR +{ +font-weight:bold; +} +.numeric, .numeric TD +{ +text-align:right; +padding-right:2em; +} +.normaltable, .normaltable TD, .normaltable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:White; +} +.errorltable, .errortable TD, .errortable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:Red; +font-weight:Bold; +} +.warningtable, .warningtable TD, .warningtable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:khaki; +} +.extraWarningTable, .extraWarningTable TD, .extraWarningTable TH +{ +font-family:Bitstream Vera Sans Mono, monospace; +font-size:0.9em; +color:Black; +background-color:Yellow; +} +</style> +</head> +<body> + +<?php + echo "<h1>Compile Logs: Test Bundles for $buildName</h1>"; +?> + + +<table id=tabledata align = "center" width="75%" border="1"> + <tr> + <td class="bold" align="center">Compile Logs</td> + <td class="bold" align="center">Compile Errors</td> + <td class="bold" align="center">Compiler Warnings</td> + <td class="bold" align="center">Access Violations</td> + <td class="bold" align="center">Access Warnings</td> + </tr> + + %compilelogs% + +</table> + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testResults.php.template.php b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testResults.php.template.php new file mode 100644 index 0000000000000000000000000000000000000000..c69d7f05d4b4f643a30fa5246678f2311d865091 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.site/templateFiles/testResults.php.template.php @@ -0,0 +1,153 @@ +<html> +<head> + + +<?php +//ini_set("display_errors", "true"); +//error_reporting (E_ALL); + +$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"> + +<style> +.bold,.bold TD,.bold TH,.bold TR { + font-weight: bold; +} + +.numeric,.numeric TD { + text-align: right; + padding-right: 2em; +} + +.normaltable,.normaltable TD,.normaltable TH { + font-family: Bitstream Vera Sans Mono, monospace; + font-size: 0.9em; + color: Black; + background-color: White; +} + +.errorltable,.errortable TD,.errortable TH { + font-family: Bitstream Vera Sans Mono, monospace; + font-size: 0.9em; + color: Black; + background-color: Red; + font-weight: Bold; +} + +.warningtable,.warningtable TD,.warningtable TH { + font-family: Bitstream Vera Sans Mono, monospace; + font-size: 0.9em; + color: Black; + background-color: khaki; +} + +.extraWarningTable,.extraWarningTable TD,.extraWarningTable TH { + font-family: Bitstream Vera Sans Mono, monospace; + font-size: 0.9em; + color: Black; + background-color: Yellow; +} +</style> + + +</head> +<body> + <p> + <b><font face="Verdana" size="+3">Test 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"> Extra results and logs </font> + </b> + </td> + </tr> + </table> + + + +<?php +if (file_exists("testResults")) +{ + $dir = dir("testResults"); + while ($anEntry = $dir->read()) + { + if ($anEntry != "." && $anEntry != ".." && $anEntry != "consolelogs" && $anEntry != "html" && $anEntry != "xml") + + { + if (is_dir($anEntry)) { + $link = "testResults/".$anEntry."/results/index.php"; + echo "<p><a href=\"$link\">$anEntry</a></p> \n"; + } + else { + // assume is file + $path_parts = pathinfo($anEntry); + $file_extension = $path_parts['extension']; + if (isset($path_parts['filename'])) { + $linkname = $path_parts['filename']; + } + else { + $linkname = $anEntry; + } + + $link = $anEntry; + if ("html" === $file_extension || "php" === $file_extension || "log" === $file_extension || "txt" === $file_extension) { + echo "<p><a href=testResults/" . $link . ">" . $linkname . "</a></p>\n"; + } + } + } + } +} +?> + + + + +<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">Unit Test Results for <?php echo "$buildName"; ?> + </font></b></td> + </tr> +</table> + +<table id=tableunittestdata align="center" width="75%" border="1"> + <tr> + <td class="bold" align="center" width="70%">Test Suite</td> + <td class="bold" align="center" width="15%">Errors & Failures</td> + <td class="bold" align="center" width="15%">Total Tests</td> + <td class="bold" align="center" width="15%">Total Time (s)</td> + </tr> + + + %testresults% + +</table> +<p></p> +<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"> Console output logs <?php echo "$buildName"; ?> + </font></b></td> + </tr> +</table> +<br> +These +<a href="consoleLogs.php">logs</a> +contain the console output captured while running the JUnit automated +tests. +<br> +<br> + + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.tests/build.xml b/releng.wtpbuilder/distribution/patches32x.tests/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..3227847fcc75a6851b85e34a13297a9f066446f8 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/build.xml @@ -0,0 +1,460 @@ +<project + name="Build specific targets and properties" + default="runTest"> + <!-- + 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 the environment variables + on your operating system are not, e.g. it will be ${env.Path} + not ${env.PATH} on Windows + --> + <property environment="env"/> + <fail + message="testRoot must be set for this task" + unless="testRoot"/> + <!-- required to get proper value of branch specific values --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="debug" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + <!-- + typcially already set, but in case of standalone tests, may not + be + --> + <property + name="buildLabel" + value="${buildType}-${buildId}-${timestamp}"/> + + + <!-- + Steps to do after the build is done. + --> + <target name="test"> + <dirname + file="${ant.file}" + property="currentDirectory"/> + <ant + antfile="${ant.file}" + target="runTest" + dir="${currentDirectory}"/> + </target> + + <!-- + Steps to do to test the build results + --> + <target name="runTest"> + <dirname + file="${ant.file}" + property="test.component.dir"/> + <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/> + <property file="${buildDirectory}/label.properties"/> + <property file="${wtp.builder.home}/build.properties"/> + <fail + message="testRoot must be set for this task" + unless="testRoot"/> + <mkdir dir="${testRoot}"/> + + <!-- if results already exist, delete them --> + <delete + quiet="true" + dir="${testRoot}/results" + failOnError="false"/> + <mkdir dir="${testRoot}/results"/> + <mkdir dir="${testRoot}/results/consolelogs"/> + <copy + todir="${testRoot}" + overwrite="true"> + <fileset dir="${test.component.dir}/testScripts"/> + </copy> + <echo level="debug" message="BASEOS: ${env.BASEOS} BASEWS: ${env.BASEWS} BASEARCH: ${env.BASEARCH} "/> + + <property + name="dependency.properties" + value="${buildDirectory}/maps/${env.RELENG}/${dependencyFileLocation}"/> + <available + file="${dependency.properties}" + property="dependency.properties.exists"/> + <fail + message="dependency file not found: ${dependency.properties}" + unless="dependency.properties.exists"/> + <property + name="test.dependency" + value="${wtp.builder.home}/scripts/dependency/dependency.xml"/> + <available + file="${test.dependency}" + property="test.dependency.exists"/> + <fail + message="test dependency file not found: ${test.dependency}" + unless="test.dependency.exists"/> + <echo level="debug" message="test.dependency file: ${test.dependency}"/> + <ant + antfile="${test.dependency}" + target="get"> + <property + name="base.install.dir" + value="${testRoot}"/> + <property + name="tobeinstalled.properties" + value="${buildDirectory}/maps/${env.RELENG}/distribution/${build.distribution}.tests/tobeInstalled.properties"/> + + <property + name="installWorkingDirectory" + value="${testRoot}"/> + + + + </ant> + <antcall target="installTests"/> + <antcall target="runTestEclipse"> + <param + name="testTarget" + value="all"/> + </antcall> + <antcall target="postRunTestEclipse"> + <param + name="testTarget" + value="all"/> + </antcall> + </target> + + <!-- + note: the 'test.installed' attribute is a temporary hack + to allow standalone tests to do the install themselves. + Eventually, this script should be improved so this hack would + be not required. The "location" of the + zips/repos are indirectly currently "hard coded" to + be in /projects/... but + this should become a variable, sometimes (maybe) + set to /projects/..., + more often set to some URL from committers or downloads pages. + See the repos values below in repo install: + value="file://${buildDirectory}/${buildLabel}/repository/,file://${buildDirectory}/${buildLabel}/repositoryunittests/"/> + These should be changed to be something like + value="${coderepo},${unittestsrepo}"/> + Or similar. Then could be set as desired. + --> + <target + name="installTests" + unless="test.installed"> + + <!-- hard code for now + <antcall + target="installTestsFromZips"> + <param + name="compName" + value="patches32x"/> + </antcall> + --> + <antcall target="installTestsFromRepo"> + </antcall> + + + </target> + + <target + name="installTestsFromZips" + depends="init"> + + <!-- a bit hard coded here, will need work for general case --> + <property + name="zipFile" + value="${compName}-${buildLabel}.zip"/> + + + <!-- + We use the exec method for unzip, so we won't fail if a + prereq can not be unzipped for some reason. See + https://bugs.eclipse.org/bugs/show_bug.cgi?id=283968 +--> + <mkdir dir="${install.destination}"/> + <exec + dir="." + executable="unzip"> + <arg line="-o -qq ${buildDirectory}/${buildLabel}/${zipFile} -d ${install.destination}/${compName}"/> + </exec> + + </target> + + <target name="installTestsFromRepo"> + + <java + taskname="p2Director Install" + fork="true" + resultProperty="p2DirectorInstallResult" + failonerror="false" + timeout="${testTimeLimit}" + dir="${testRoot}" + jvm="${env.JAVA_6_HOME}/bin/java" + classname="org.eclipse.equinox.launcher.Main"> + <classpath> + <fileset dir="${testRoot}/eclipse/plugins"> + <include name="org.eclipse.equinox.launcher_*.jar"/> + </fileset> + </classpath> + <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> + <jvmarg value="-Dbuild.distribution=${build.distribution}"/> + <arg value="-nosplash"/> + <arg value="-debug"/> + <arg value="-consolelog"/> + <arg value="-data"/> + <arg value="${testRoot}/p2DirectorInstall"/> + <arg value="-application"/> + <arg value="org.eclipse.equinox.p2.director"/> + <arg value="-destination"/> + <arg value="${testRoot}/eclipse"/> + + <arg value="-repository"/> + <arg value="file://${buildDirectory}/${buildLabel}/repository/,file://${buildDirectory}/${buildLabel}/repositoryunittests/"/> + <arg value="-installIU"/> + <arg value="${wtpFeatureIUs},${testFeatureIUs}"/> + + <!-- make sure our forked env has a DISPLAY --> + <env + key="DISPLAY" + value="${env.DISPLAY}"/> + <redirector + output="${testRoot}/results/fullOutput.txt" + error="${testRoot}/results/fullErrorLog.txt"/> + + </java> + <!-- If the task succeeds, this ouput log won't be that relevent ... (can be make better in future ... but for now we'll make a copy, + just in case we need it --> + <echo level="debug" message="p2DirectorInstallResult: ${p2DirectorInstallResult}"/> + + <condition property="p2DirectorInstallFailed"> + <not> + <equals + arg1="0" + arg2="${p2DirectorInstallResult}"/> + </not> + </condition> + +<!-- always copy to test results, even when successful --> + <copy + file="${testRoot}/results/fullOutput.txt" + tofile="${buildDirectory}/${buildLabel}/testResults/p2DirectorInstall.log.txt" + overwrite="false" + failonerror="false"> + </copy> + + <antcall target="handleFailedInstall"/> + + + </target> + <target + name="handleFailedInstall" + if="p2DirectorInstallFailed"> + + <!-- copy to direct location, as a signal (to web pages) it failed and link should be provided --> + <copy + file="${testRoot}/results/fullOutput.txt" + tofile="${buildDirectory}/${buildLabel}/p2DirectorInstall.log.txt" + overwrite="false" + failonerror="false"> + </copy> + + <fail + message="installation of tests failed. See p2DirectorInstall.log.txt." + if="p2DirectorInstallResult"/> + + </target> + <!-- + time out may need to be set/adjust for api or performance tests? + This testTimeLimit is the whole, overall limit on tests. There's + a shorter one for individual suites. some common values, of + milliseconds to more recognizable units: + 14400000: 4 hours + 7200000: 2 hours + 3600000: 1 hour + 1800000: 30 minutes + 600000: 10 minutes + --> + <property + name="testTimeLimit" + value="28800000"/> + <property + name="testFailOnError" + value="false"/> + <target + name="runTestEclipse" + description="Run our JUnit's within an instance of antRunner"> + <property + name="test-vm" + value="${env.JAVA_6_HOME}/bin/java"/> + <!-- + set path to eclipse folder. If local folder, use '.'; + otherwise, use c:\path\to\eclipse or /path/to/eclipse/ + --> + <property + name="eclipse.home" + value="${testRoot}"/> + <echo level="debug" message="testTarget: ${testTarget}"/> + <!-- + can not pass in empty values in jvmargs so if not testBundle + specified, we'll pass a junk (unused) value + --> + <condition + property="testBundleParam" + value="-DtestBundle=${testBundle}" + else="-Dunused=nouse"> + <isset property="testBundle"/> + </condition> + <echo message="Running junits"/> + <!-- + If there is not exactly one launcher in the stack, we'd best + fail fast, since we are not expecting that, and may indicate + an installation that would produce unpredictable results + --> + <!-- + requires ant 1.7, and at this point, we're running 1.6 from + eclipse ... <condition property="expectedNumberOfLaunchers"> + <resourcecount when="equal" count="1" > <fileset + dir="${testRoot}/eclipse/plugins"> <include + name="org.eclipse.equinox.launcher_*.jar" /> </fileset> + </resourcecount> </condition> <fail message="Did not find + expected number of launcher jars. Check installation." + unless="expectedNumberOfLaunchers" /> + --> + + <condition + property="antQuietValue" + value="-quiet" + else=""> + <istrue value="${env.USE_QUIET}"/> + </condition> + <java + taskname="unit-test-masterprocess" + fork="true" + resultProperty="wtpmasterjunitresult" + failonerror="false" + timeout="${testTimeLimit}" + dir="${testRoot}/eclipse" + jvm="${env.JAVA_6_HOME}/bin/java" + classname="org.eclipse.equinox.launcher.Main"> + <classpath> + <fileset dir="${testRoot}/eclipse/plugins"> + <include name="org.eclipse.equinox.launcher_*.jar"/> + </fileset> + </classpath> + <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> + <jvmarg value="-Dosgi.os=${env.BASEOS}"/> + <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> + <jvmarg value="-Dws=${env.BASEWS}"/> + <jvmarg value="-Dos=${env.BASEOS}"/> + <jvmarg value="-Darch=${env.BASEARCH}"/> + <jvmarg value="-DbuildBranch=${buildBranch}"/> + <jvmarg value="-DbuildType=${buildType}"/> + <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/> + <jvmarg value="-DbuildId=${buildId}"/> + <jvmarg value="-Dprojectname=${projectname}"/> + <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> + <jvmarg value="-Dbuild.distribution=${build.distribution}"/> + <jvmarg value="${testBundleParam}"/> + <arg value="-nosplash"/> + <arg value="-consolelog"/> + <arg value="-data"/> + <arg value="${testRoot}/overallTestWorkspace"/> + <arg value="-application"/> + <arg value="org.eclipse.ant.core.antRunner"/> + <arg value="${antQuietValue}"/> + <arg value="-logger"/> + <arg value="org.apache.tools.ant.DefaultLogger"/> + <arg value="-file"/> + <arg value="${testRoot}/test.xml"/> + <arg value="${testTarget}"/> + + <!-- make sure our forked env has a DISPLAY --> + <env + key="DISPLAY" + value="${env.DISPLAY}"/> + <redirector + output="${testRoot}/results/fullOutput.txt" + error="${testRoot}/results/fullErrorLog.txt"/> + <jvmarg value="-Dbuild.home=${env.BUILD_HOME}"/> + <jvmarg value="-DbuildDirectory=${buildDirectory}"/> + <jvmarg value="-DbuildLabel=${buildLabel}"/> + <jvmarg value="-DbaseLocation=${baseLocation}"/> + <jvmarg value="-DtestRoot=${testRoot}"/> + <jvmarg value="-DtestDir=${testRoot}"/> + <jvmarg value="-DeclipseBuilderDirectory=${pde.builder.path}"/> + <!-- + <!- - IBM_JAVA_OPTIONS contains JIT work arounds for bug + 284441 - -> <env key="IBM_JAVA_OPTIONS" + value="-Xjit:{org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead),{org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.primGetNextToken()Ljava/lang/String;}(disableLookahead)"/> + --> + </java> + <echo message="wtpmasterjunitresult ${wtpmasterjunitresult}"/> + </target> + <target name="postRunTestEclipse"> + <copy + todir="${buildDirectory}/${buildLabel}/testResults/consolelogs/testLogs" + overwrite="true" + failonerror="false"> + <fileset dir="${testRoot}/results"> + <include name="*output.txt"/> + </fileset> + </copy> + <copy + todir="${buildDirectory}/${buildLabel}/testResults/consolelogs/testSysErrorLogs" + overwrite="true" + failonerror="false"> + <fileset dir="${testRoot}/results"> + <include name="*error.txt"/> + </fileset> + </copy> + <copy + file="${testRoot}/results/fullOutput.txt" + toDir="${buildDirectory}/${buildLabel}/testResults/consolelogs/full" + overwrite="true" + failonerror="false"> + </copy> + <copy + file="${testRoot}/results/fullErrorLog.txt" + toDir="${buildDirectory}/${buildLabel}/testResults/consolelogs/full" + overwrite="true" + failonerror="false"> + </copy> + <copy + todir="${buildDirectory}/${buildLabel}/testResults/xml" + overwrite="true" + failonerror="false"> + <fileset dir="${testRoot}/results/xml"> + <include name="*.xml"/> + </fileset> + </copy> + <copy + todir="${buildDirectory}/${buildLabel}/testResults/html" + overwrite="true" + failonerror="false"> + <fileset dir="${testRoot}/results/html"> + <include name="*.html"/> + </fileset> + </copy> + <copy + todir="${buildDirectory}/${buildLabel}/testResults/" + overwrite="true" + failonerror="false"> + <fileset dir="${testRoot}/results/"> + <include name="*.html"/> + </fileset> + </copy> + </target> + + <target name="init"> + + <echo level="debug" message="dropinsFolder: ${dropinsFolder} "/> + <condition + property="install.destination" + value="${testRoot}${dropinsFolder}/" + else="${testRoot}/eclipse"> + <isset property="dropinsFolder"/> + </condition> + + </target> + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.tests/templateFiles/index.php b/releng.wtpbuilder/distribution/patches32x.tests/templateFiles/index.php new file mode 100644 index 0000000000000000000000000000000000000000..f6336cf594116f9c21f64d889f2a85a18cd02375 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/templateFiles/index.php @@ -0,0 +1,92 @@ +<html> +<head> + + + + +<?php +$parts = explode("/", realpath("..")); +$label = $parts[count($parts) - 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"> +</head> +<body> + <p> + <b><font face="Verdana" size="+3">Test 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">Unit Test Results for <?php echo "$label"; ?> + </font> </b> + </td> + </tr> + </table> + <p></p> + <table border="0"> + </table> + + <table width="77%" border="1"> + <tr> + <td width="81%"><b>Tests Performed</b> + </td> + <td width="19%"><b>Errors & Failures</b> + </td> + </tr> + + <? + $dir = dir("html"); + while ($anEntry = $dir->read()) + { + if ($anEntry != "." && $anEntry != "..") + { + $link = "html/".$anEntry; + $xml = "xml/".substr($anEntry, 0, strlen($anEntry)-4)."xml"; + $count = 0; + $fileHandle = fopen($xml, "r"); + while (!feof($fileHandle)) + { + $aLine = fgets($fileHandle, 4096); // Length parameter only optional after 4.2.0 + $count = $count + substr_count($aLine, '<error'); + } + fclose($fileHandle); + if ($count > 0) + { + echo "<tr><td><a href=\"$link\"><b><font color=\"red\">"; + echo "$anEntry"; + echo "</font></b></a></td>"; + echo "<td><b><font color=\"red\">$count</font></b></td></tr>"; + } + else + { + echo "<tr><td><a href=\"$link\">"; + echo "$anEntry"; + echo "</a></td>"; + echo "<td>$count</td></tr>"; + } + } + } + ?> + + </table> + <p></p> + <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"> Console output logs <?php echo "$label"; ?> + </font> </b> + </td> + </tr> + </table> + <br> These + <a href="consolelogs/wtptestlog.txt">logs</a> contain the console + output captured while running the JUnit automated tests. + <br> + <br> + +</body> +</html> diff --git a/releng.wtpbuilder/distribution/patches32x.tests/testScripts/JUNIT.XSL b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/JUNIT.XSL new file mode 100644 index 0000000000000000000000000000000000000000..bd3fc83b7d7bcf12053e0348897d6faa60f4cb72 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/JUNIT.XSL @@ -0,0 +1,581 @@ +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <xsl:output + method="html" + indent="yes"/> + <xsl:decimal-format + decimal-separator="." + grouping-separator=","/> + <xsl:template match="testsuites"> + <HTML> + <HEAD> + <style type="text/css"> body { font:normal 68% + verdana,arial,helvetica; color:#000000; } table tr + td, table tr th { + font-size: 68%; + } table.details tr + th{ font-weight: bold; text-align:left; + background:#a6caf0; } table.details tr + td{ + background:#eeeee0; } p { line-height:1.5em; + margin-top:0.5em; margin-bottom:1.0em; } h1 { + margin: 0px 0px 5px; + font: 165% + verdana,arial,helvetica } h2 { margin-top: 1em; + margin-bottom: 0.5em; font: bold 125% + verdana,arial,helvetica } h3 { margin-bottom: 0.5em; + font: bold 115% verdana,arial,helvetica } h4 { + margin-bottom: 0.5em; font: bold 100% + verdana,arial,helvetica } h5 { margin-bottom: 0.5em; + font: bold 100% + verdana,arial,helvetica } h6 { + margin-bottom: 0.5em; font: bold 100% + verdana,arial,helvetica } .Error { + font-weight:bold; + color:red; } .Failure { font-weight:bold; + color:purple; } .Properties { text-align:right; } + </style> + <script language="JavaScript"> + var TestCases = new Array(); var cur; + <xsl:for-each select="./testsuite"> + <xsl:apply-templates select="properties"/> + </xsl:for-each> + </script> + <script language="JavaScript"><![CDATA[ + function displayProperties (name) { + var win = window.open('','JUnitSystemProperties','scrollbars=1,resizable=1'); + var doc = win.document.open(); + doc.write("<html><head><title>Properties of " + name + "</title>"); + doc.write("<style>") + doc.write("body {font:normal 68% verdana,arial,helvetica; color:#000000; }"); + doc.write("table tr td, table tr th { font-size: 68%; }"); + doc.write("table.properties { border-collapse:collapse; border-left:solid 1 #cccccc; border-top:solid 1 #cccccc; padding:5px; }"); + doc.write("table.properties th { text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#eeeeee; }"); + doc.write("table.properties td { font:normal; text-align:left; border-right:solid 1 #cccccc; border-bottom:solid 1 #cccccc; background-color:#fffffff; }"); + doc.write("h3 { margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica }"); + doc.write("</style>"); + doc.write("</head><body>"); + doc.write("<h3>Properties of " + name + "</h3>"); + doc.write("<div align=\"right\"><a href=\"javascript:window.close();\">Close</a></div>"); + doc.write("<table class='properties'>"); + doc.write("<tr><th>Name</th><th>Value</th></tr>"); + for (prop in TestCases[name]) { + doc.write("<tr><th>" + prop + "</th><td>" + TestCases[name][prop] + "</td></tr>"); + } + doc.write("</table>"); + doc.write("</body></html>"); + doc.close(); + win.focus(); + } + ]]> + </script> + </HEAD> + <body> + <a name="top"></a> + <xsl:call-template name="pageHeader"/> + + <!-- Summary part --> + <xsl:call-template name="summary"/> + <hr + size="1" + width="95%" + align="left"/> + + <!-- Package List part --> + <xsl:call-template name="packagelist"/> + <hr + size="1" + width="95%" + align="left"/> + + <!-- For each package create its part --> + <xsl:call-template name="packages"/> + <hr + size="1" + width="95%" + align="left"/> + + <!-- For each class create the part --> + <xsl:call-template name="classes"/> + </body> + </HTML> + </xsl:template> + <!-- + ================================================================== + --> + <!-- + Write a list of all packages with an hyperlink to the anchor of + --> + <!-- + of the package name. + --> + <!-- + ================================================================== + --> + <xsl:template name="packagelist"> + <h2>Packages</h2> + Note: package statistics are not computed recursively, they only + sum up all of its testsuites numbers. + <table + class="details" + border="0" + cellpadding="5" + cellspacing="2" + width="95%"> + <xsl:call-template name="testsuite.test.header"/> + <!-- list all packages recursively --> + <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> + <xsl:sort select="@package"/> + <xsl:variable + name="testsuites-in-package" + select="/testsuites/testsuite[./@package = current()/@package]"/> + <xsl:variable + name="testCount" + select="sum($testsuites-in-package/@tests)"/> + <xsl:variable + name="errorCount" + select="sum($testsuites-in-package/@errors)"/> + <xsl:variable + name="failureCount" + select="sum($testsuites-in-package/@failures)"/> + <xsl:variable + name="timeCount" + select="sum($testsuites-in-package/@time)"/> + + <!-- write a summary for the package --> + <tr valign="top"> + <!-- set a nice color depending if there is an error/failure --> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="$failureCount > 0">Failure</xsl:when> + <xsl:when test="$errorCount > 0">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <td> + <a href="#{@package}"> + <xsl:value-of select="@package"/> + </a> + </td> + <td> + <xsl:value-of select="$testCount"/> + </td> + <td> + <xsl:value-of select="$errorCount"/> + </td> + <td> + <xsl:value-of select="$failureCount"/> + </td> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param + name="value" + select="$timeCount"/> + </xsl:call-template> + </td> + </tr> + </xsl:for-each> + </table> + </xsl:template> + <!-- + ================================================================== + --> + <!-- + Write a package level report + --> + <!-- + It creates a table with values from the document: + --> + <!-- + Name | Tests | Errors | Failures | Time + --> + <!-- + ================================================================== + --> + <xsl:template name="packages"> + <!-- create an anchor to this package name --> + <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]"> + <xsl:sort select="@package"/> + <a name="{@package}"></a> + <h3> + Package + <xsl:value-of select="@package"/> + </h3> + <table + class="details" + border="0" + cellpadding="5" + cellspacing="2" + width="95%"> + <xsl:call-template name="testsuite.test.header"/> + + <!-- match the testsuites of this package --> + <xsl:apply-templates + select="/testsuites/testsuite[./@package = current()/@package]" + mode="print.test"/> + </table> + <a href="#top">Back to top</a> + <p/> + <p/> + </xsl:for-each> + </xsl:template> + <xsl:template name="classes"> + <xsl:for-each select="testsuite"> + <xsl:sort select="@name"/> + <!-- create an anchor to this class name --> + <a name="{@name}"></a> + <h3> + TestCase + <xsl:value-of select="@name"/> + </h3> + <table + class="details" + border="0" + cellpadding="5" + cellspacing="2" + width="95%"> + <xsl:call-template name="testcase.test.header"/> + <!-- + test can even not be started at all (failure to load + the class) so report the error directly + --> + <xsl:if test="./error"> + <tr class="Error"> + <td colspan="4"> + <xsl:apply-templates select="./error"/> + </td> + </tr> + </xsl:if> + <xsl:apply-templates + select="./testcase" + mode="print.test"/> + </table> + <div class="Properties"> + <a> + <xsl:attribute name="href">javascript:displayProperties('<xsl:value-of select="@package"/>.<xsl:value-of + select="@name"/>');</xsl:attribute> + Properties >> + </a> + </div> + <p/> + <a href="#top">Back to top</a> + </xsl:for-each> + </xsl:template> + <xsl:template name="summary"> + <h2>Summary</h2> + <xsl:variable + name="testCount" + select="sum(testsuite/@tests)"/> + <xsl:variable + name="errorCount" + select="sum(testsuite/@errors)"/> + <xsl:variable + name="failureCount" + select="sum(testsuite/@failures)"/> + <xsl:variable + name="timeCount" + select="sum(testsuite/@time)"/> + <xsl:variable + name="successRate" + select="($testCount - $failureCount - $errorCount) div $testCount"/> + <table + class="details" + border="0" + cellpadding="5" + cellspacing="2" + width="95%"> + <tr valign="top"> + <th>Tests</th> + <th>Failures</th> + <th>Errors</th> + <th>Success rate</th> + <th>Time</th> + </tr> + <tr valign="top"> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="$failureCount > 0">Failure</xsl:when> + <xsl:when test="$errorCount > 0">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <td> + <xsl:value-of select="$testCount"/> + </td> + <td> + <xsl:value-of select="$failureCount"/> + </td> + <td> + <xsl:value-of select="$errorCount"/> + </td> + <td> + <xsl:call-template name="display-percent"> + <xsl:with-param + name="value" + select="$successRate"/> + </xsl:call-template> + </td> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param + name="value" + select="$timeCount"/> + </xsl:call-template> + </td> + </tr> + </table> + <table + border="0" + width="95%"> + <tr> + <td style="text-align: justify;"> + Note: + <i>failures</i> + are anticipated and checked for with assertions + while + <i>errors</i> + are unanticipated. + </td> + </tr> + </table> + </xsl:template> + <!-- + Write properties into a JavaScript data structure. This is based + on the original idea by Erik Hatcher (erik@hatcher.net) + --> + <xsl:template match="properties"> + cur = TestCases[' + <xsl:value-of select="../@package"/> + . + <xsl:value-of select="../@name"/> + '] = new Array(); + <xsl:for-each select="property"> + <xsl:sort select="@name"/> + cur[' + <xsl:value-of select="@name"/> + '] = ' + <xsl:call-template name="JS-escape"> + <xsl:with-param + name="string" + select="@value"/> + </xsl:call-template> + '; + </xsl:for-each> + </xsl:template> + + <!-- Page HEADER --> + <xsl:template name="pageHeader"> + <h1>Unit Test Results</h1> + <table width="100%"> + <tr> + <td align="left"></td> + <td align="right"> + Designed for use with + <a href='http://www.junit.org'>JUnit</a> + and + <a href='http://jakarta.apache.org/ant'>Ant</a> + . + </td> + </tr> + </table> + <hr size="1"/> + </xsl:template> + <xsl:template + match="testsuite" + mode="header"> + <tr valign="top"> + <th width="80%">Name</th> + <th>Tests</th> + <th>Errors</th> + <th>Failures</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + <!-- class header --> + <xsl:template name="testsuite.test.header"> + <tr valign="top"> + <th width="80%">Name</th> + <th>Tests</th> + <th>Errors</th> + <th>Failures</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + <!-- method header --> + <xsl:template name="testcase.test.header"> + <tr valign="top"> + <th>Name</th> + <th>Status</th> + <th width="80%">Type</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + + <!-- class information --> + <xsl:template + match="testsuite" + mode="print.test"> + <tr valign="top"> + <!-- set a nice color depending if there is an error/failure --> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="@failures[.> 0]">Failure</xsl:when> + <xsl:when test="@errors[.> 0]">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + + <!-- print testsuite information --> + <td> + <a href="#{@name}"> + <xsl:value-of select="@name"/> + </a> + </td> + <td> + <xsl:value-of select="@tests"/> + </td> + <td> + <xsl:value-of select="@errors"/> + </td> + <td> + <xsl:value-of select="@failures"/> + </td> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param + name="value" + select="@time"/> + </xsl:call-template> + </td> + </tr> + </xsl:template> + <xsl:template + match="testcase" + mode="print.test"> + <tr valign="top"> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="failure | error">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <td> + <xsl:value-of select="@name"/> + </td> + <xsl:choose> + <xsl:when test="failure"> + <td>Failure</td> + <td> + <xsl:apply-templates select="failure"/> + </td> + </xsl:when> + <xsl:when test="error"> + <td>Error</td> + <td> + <xsl:apply-templates select="error"/> + </td> + </xsl:when> + <xsl:otherwise> + <td>Success</td> + <td></td> + </xsl:otherwise> + </xsl:choose> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param + name="value" + select="@time"/> + </xsl:call-template> + </td> + </tr> + </xsl:template> + <xsl:template match="failure"> + <xsl:call-template name="display-failures"/> + </xsl:template> + <xsl:template match="error"> + <xsl:call-template name="display-failures"/> + </xsl:template> + + <!-- Style for the error and failure in the tescase template --> + <xsl:template name="display-failures"> + <xsl:choose> + <xsl:when test="not(@message)"> + N/A + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="@message"/> + </xsl:otherwise> + </xsl:choose> + <!-- display the stacktrace --> + <code> + <p/> + <xsl:call-template name="br-replace"> + <xsl:with-param + name="word" + select="."/> + </xsl:call-template> + </code> + <!-- + the later is better but might be problematic for non-21" + monitors... + --> + <!--pre><xsl:value-of select="."/></pre--> + </xsl:template> + <xsl:template name="JS-escape"> + <xsl:param name="string"/> + <xsl:choose> + <!-- + something isn't right here, basically all single quotes + need to be replaced with backslash-single-quote + <xsl:when test="contains($string,''')"> + <xsl:value-of + select="substring-before($string,''')"/> \' + <xsl:call-template name="JS-escape"> <xsl:with-param + name="string" + select="substring-after($string,''')"/> + </xsl:call-template> </xsl:when> + --> + <xsl:when test="contains($string,'\')"> + <xsl:value-of select="substring-before($string,'\')"/> + \\ + <xsl:call-template name="JS-escape"> + <xsl:with-param + name="string" + select="substring-after($string,'\')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$string"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <!-- + template that will convert a carriage return into a br tag + @param word the text from which to convert CR to BR tag + --> + <xsl:template name="br-replace"> + <xsl:param name="word"/> + <xsl:choose> + <xsl:when test="contains($word,'
')"> + <xsl:value-of select="substring-before($word,'
')"/> + <br/> + <xsl:call-template name="br-replace"> + <xsl:with-param + name="word" + select="substring-after($word,'
')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$word"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + <xsl:template name="display-time"> + <xsl:param name="value"/> + <xsl:value-of select="format-number($value,'0.000')"/> + </xsl:template> + <xsl:template name="display-percent"> + <xsl:param name="value"/> + <xsl:value-of select="format-number($value,'0.00%')"/> + </xsl:template> +</xsl:stylesheet> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.tests/testScripts/test.xml b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/test.xml new file mode 100644 index 0000000000000000000000000000000000000000..a203ad6d36b73698adec29208c84538571babb0c --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/test.xml @@ -0,0 +1,196 @@ +<project + name="Automated Eclipse Testing" + default="all" + basedir="."> + <property environment="env"/> + <!-- required to get proper value of branch specific properties --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + <echo + level="info" + message="starting Automated Eclipse Testing"/> + <echo + level="info" + message="ant file basedir: ${basedir}"/> + <echo + level="info" + message="testRoot: ${testRoot}"/> + <fail + message="testRoot must be set" + unless="testRoot"/> + + <!--properties file containing the some server name properties --> + <property file="${testRoot}/testServer.properties"/> + + <!--properties file containing the build information--> + <property file="${buildDirectory}/label.properties"/> + + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + <!-- + name that can be added to report name to identify which platform + tests results come from + --> + <property + name="platform" + value=""/> + <!-- + TODO: The framework apps might need this. But we should + elmimnate if posslbe. + --> + <property + name="eclipse-home" + value="${testRoot}/eclipse"/> + <!-- + The directory that will contain the xml and html results from + the tests that are run + --> + <property + name="results" + value="${testRoot}/results"/> + <property + name="library-file" + value="${testRoot}/wtp-junit-tests.xml"/> + + <!-- jonas install directory --> + <!-- TODO: why do this twice? Here and in init? --> + <property + name="jonas432Dir" + value="${testRoot}/${jonas432DirName}"/> + <target name="init"> + <antcall target="setPropertyJOnAS432Dir"/> + </target> + <target + name="setPropertyJOnAS432Dir" + unless="jonas432Dir"> + <property + name="jonas432Dir" + value="${testRoot}/${jonas432DirName}"/> + </target> + <target + name="all" + depends="init,runOneTestBundle" + unless="testBundle"> + <echo + level="info" + message="Starting Unit Tests"/> + <!-- + unlike other ant tasks, subant defaults to false for + inheritall! + --> + <subant + target="" + inheritall="true"> + <!-- note that we specify "high" directory to get tests installed + in any location --> + <fileset dir="${testRoot}"> + <!-- but we must be sure to exclude _this_ test.xml file + we are running --> + <exclude name="test.xml"/> + <exclude name="**/*performance*/test.xml"/> + <exclude name="**/*wtp.releng.tests_1.1.0*/test.xml"/> + <include name="**/*releng*/test.xml"/> + </fileset> + </subant> + <!-- copy early, if we can --> + + <antcall target="genHtml"/> + <ant antfile="${wtp.builder.home}/scripts/build/copyArtifactsEarly.xml"/> + <subant + target="" + inheritall="true"> + <!-- note that we specify "high" directory to get tests installed + in any location --> + <fileset dir="${testRoot}"> + <!-- but we must be sure to exclude _this_ test.xml file + we are running --> + <exclude name="test.xml"/> + <exclude name="**/*performance*/test.xml"/> + <exclude name="**/*releng*/test.xml"/> + <include name="**/test.xml"/> + </fileset> + </subant> + + + <echo + level="info" + message="Ended Unit Tests"/> + <antcall target="genHtml"/> + + <available + file="${results}/xml" + type="dir" + property="resultsWereGenerated"/> + + <fail + unless="resultsWereGenerated" + message="Unit tests results were not generated when expected. Probable build error."/> + + </target> + <!-- + by making 'all' the default, and "runOneTestBundle" as its + 'depends' we can effectively control which is ran based on + whether or not 'testBundle' has been defined by caller. If so, + only that one is ran, otherwise, all of them are. Note, in many + cases a collection of tests could be ran, by specifying a + partial bundle name. for example, specifying + "org.eclipse.jst.jsp" would execute the 3 JSP tests: + org.eclipse.jst.jsp.core.tests, + org.eclipse.jst.jsp.tests.encoding, + org.eclipse.jst.jsp.ui.tests. + --> + <target + name="runOneTestBundle" + depends="init" + if="testBundle"> + <echo + level="info" + message="Starting Unit Tests for one test bundle"/> + <!-- + unlike other ant tasks, subant defaults to false for + inheritall! + --> + <subant + target="" + inheritall="true"> + <fileset dir="${eclipse-home}/"> + <exclude name="**/*performance*/test.xml"/> + <include name="**/${testBundle}*/test.xml"/> + </fileset> + </subant> + <echo + level="info" + message="Finished Unit Tests for one test bundle"/> + <antcall target="genHtml"/> + </target> + <target + name="genHtml" + description="Generates HTML results with provided JUNIT.XSL provided" + depends="checkGenHTMLConditions" + if="resultsWereGenerated"> + <xslt + style="JUNIT.XSL" + basedir="${results}/xml" + destdir="${results}/html"/> + </target> + <!-- + It is a likely a build error if no results have been produced ... but error + message from xslt failure is not very clear. + --> + <target name="checkGenHTMLConditions"> + <echo message="results xml: ${results}/xml"/> + <available + file="${results}/xml" + type="dir" + property="resultsWereGenerated"/> + </target> + +</project> \ No newline at end of file diff --git a/releng.wtpbuilder/distribution/patches32x.tests/testScripts/testServer.properties b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/testServer.properties new file mode 100644 index 0000000000000000000000000000000000000000..be77c9bc0de092ec2de2dcdc2d93ac13df2d6bbd --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/testServer.properties @@ -0,0 +1,21 @@ + +# Tomcat dirs +tomcat50Dir=jakarta-tomcat-5.0.28 + +# Jonas dirs +#jonas432Dir= +jonas432DirName=JONAS_4_3_2 + +# SWT +#swt.lib.path=org.eclipse.swt.motif_3.1.0/os/linux/x86 +swt.lib.path=org.eclipse.swt.win32_3.1.0/os/win32/x86 + +# JSF Runtime Library directory +jsf1.1Dir=myfaces-core-1.1.5/lib + +# JPT Persistence Runtime Library path +jpt-persistence-jar=jpt/jpt-persistence-2.0-preview/lib/javax.persistence_2.0_preview.jar +jpt-eclipselink-jar=jpt/jpt-eclipselink-2.0.0/lib/eclipselink.jar + +jpt-persistence10-jar=jpt/persistence-1.0/lib/persistence.jar +jpt-eclipselink110-jar=jpt/eclipselink-1.1.0/lib/eclipselink.jar diff --git a/releng.wtpbuilder/distribution/patches32x.tests/testScripts/wtp-junit-tests.xml b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/wtp-junit-tests.xml new file mode 100644 index 0000000000000000000000000000000000000000..76a82030bf11ebf3223d26c3f692c1ffdf6834f3 --- /dev/null +++ b/releng.wtpbuilder/distribution/patches32x.tests/testScripts/wtp-junit-tests.xml @@ -0,0 +1,275 @@ +<?xml version="1.0"?> +<project + name="JUnit tests" + basedir="."> + <property environment="env"/> + + <!-- required to get proper value of branch specific properties --> + <property + name="keyCfgFile" + value="${env.PROJECT_BUILDERS}/${projectname}/${env.RELENG}/maps/build.cfg"/> + <echo + level="info" + message="keyCfgFile: ${keyCfgFile}"/> + <property file="${keyCfgFile}"/> + <target name="init"> + <property + name="junit-report-output" + value="${testRoot}/results"/> + <mkdir dir="${junit-report-output}/raw"/> + <!-- + if not otherwise set, be sure extraVMargs is at least some + string, even if unused string. + + Remember, though, extraVMArgs can contain more than one extra arg, + so much be passed to VM as a "line", not "value". + --> + <property + name="extraVMargs" + value="-DextraVMargsunused=notused"/> + + <!-- if not otherwise set, use a unique workspace name --> + <property + name="data-dir" + value="${testRoot}/junitworkspaces/workspace-${classname}"/> + <!-- + Some common values, of milliseconds to more recognizable units: + 14400000: 4 hours + 7200000: 2 hours + 3600000: 1 hour + 1800000: 30 minutes + 600000: 10 minutes + --> + <property + name="timeout" + value="5400000"/> + <property + name="junit-report-output" + value="${junit-report-output}"/> + <property + name="formatter" + value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/> + <property + name="test-output" + value="${junit-report-output}/raw/${classname}.xml"/> + <property + name="jvm" + value="${env.JAVA_6_HOME}/bin/java"/> + <dirname + file="${ant.file}" + property="currentDir"/> + <echo + level="info" + message="data-dir: ${data-dir}"/> + <echo + level="info" + message="plugin-name: ${plugin-name}"/> + <echo + level="info" + message="classname: ${classname}"/> + <echo + level="info" + message="extraVMargs: ${extraVMargs}"/> + <echo + level="info" + message="timeout: ${timeout}"/> + <echo + level="info" + message="testRoot: ${testRoot}"/> + <echo + level="info" + message="ant file basedir: ${basedir}"/> + <echo + level="info" + message="junit-report-output: ${junit-report-output}"/> + <echo + level="info" + message="test-output: ${test-output}"/> + <echo + level="info" + message="buildDirectory: ${buildDirectory}"/> + <echo + level="info" + message="buildLabel: ${buildLabel}"/> + <echo + level="info" + message="jvm: ${jvm}"/> + </target> + <target + name="core-test" + depends="init"> + <echo + level="info" + message="test-type: core-test"/> + <ant + antfile="${ant.file}" + dir="${currentDir}" + target="eclipse-test"> + <property + name="application" + value="org.eclipse.test.coretestapplication"/> + </ant> + </target> + <target + name="ui-test" + depends="init"> + <echo + level="info" + message="test-type: ui-test"/> + <ant + antfile="${ant.file}" + dir="${currentDir}" + target="eclipse-test"> + <property + name="application" + value="org.eclipse.test.uitestapplication"/> + </ant> + </target> + <target + name="eclipse-test" + description="Runs the specified classname as a plug-in test."> + <echo + level="info" + message="Running ${classname}"/> + <echo + level="info" + message="Result file: ${junit-report-output}/${classname}.xml."/> + <echo + level="info" + message="DISPLAY: ${env.DISPLAY}"/> + <mkdir dir="${junit-report-output}/httplogstest"/> + <echo message="http log messages to: ${junit-report-output}/httplogstest"/> + <condition + property="xulRunnerParam" + value="org.eclipse.swt.browser.XULRunnerPath" + else="XULRunnerPathNotSpecified"> + <isset property="env.WTP_XULRUNNER"/> + </condition> + <echo message="xulRunnerParam: ${xulRunnerParam}"/> + <echo message="WTP_XULRUNNER: ${env.WTP_XULRUNNER}"/> + <echo message="redirected output: ${junit-report-output}/${classname}.output.txt"/> + <echo message="redirected error: ${junit-report-output}/${classname}.error.txt"/> + <!-- + If there is not exactly one launcher in the stack, we'd best + fail fast, since we are not expecting that, and may indicate + an installation that would produce unpredictable results + --> + <!-- + requires ant 1.7, and at this point, we're running 1.6 from + eclipse ... <condition property="expectedNumberOfLaunchers"> + <resourcecount when="equal" count="1" > <fileset + dir="${testRoot}/eclipse/plugins"> <include + name="org.eclipse.equinox.launcher_*.jar" /> </fileset> + </resourcecount> </condition> <fail message="Did not find + expected number of launcher jars. Check installation." + unless="expectedNumberOfLaunchers" /> + --> + <java + taskname="suiteUnitTest" + fork="true" + resultProperty="suitejunitresult" + failonerror="false" + timeout="${timeout}" + dir="${testRoot}/eclipse" + jvm="${jvm}" + classname="org.eclipse.equinox.launcher.Main"> + <classpath> + <fileset dir="${testRoot}/eclipse/plugins"> + <include name="org.eclipse.equinox.launcher_*.jar"/> + </fileset> + </classpath> + <jvmarg value="-Xmx758m"/> + <jvmarg value="-Xverify"/> + <jvmarg value="-Dosgi.ws=${env.BASEWS}"/> + <jvmarg value="-Dosgi.os=${env.BASEOS}"/> + <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/> + <jvmarg value="-DbuildLabel=${buildLabel}"/> + <jvmarg value="-DbuildDirectory=${buildDirectory}"/> + <jvmarg value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol"/> + <jvmarg value="-DurlLogLocation=${junit-report-output}/httplogstest/outgoinghttplog-${plugin-name}.log"/> + <jvmarg value="-Dwtp.autotest.noninteractive=true"/> + <jvmarg line="${extraVMargs}"/> + <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/> + <jvmarg value="-Dprojectname=${projectname}"/> + <jvmarg value="-Djunit-report-output=${junit-report-output}"/> + <jvmarg value="-D${xulRunnerParam}=${env.WTP_XULRUNNER}"/> + <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/> + <jvmarg value="-Dbuild.distribution=${build.distribution}"/> + <arg value="-nosplash"/> + <arg value="-consolelog"/> + <arg value="-debug"/> + <arg value="-data"/> + <arg value="${data-dir}"/> + <arg value="-application"/> + <arg value="${application}"/> + <arg value="formatter=${formatter},${test-output}"/> + <arg value="-testPluginName"/> + <arg value="${plugin-name}"/> + <arg value="-className"/> + <arg value="${classname}"/> + <env + key="DISPLAY" + value="${env.DISPLAY}"/> + <redirector + output="${junit-report-output}/${classname}.output.txt" + error="${junit-report-output}/${classname}.error.txt"/> + </java> + <echo + level="info" + message="suitejunitresult: ${suitejunitresult}"/> + <antcall target="summarizeFailure"/> + <antcall target="collect-results"/> + </target> + <target name="collect-results"> + <dirname + property="output-dir" + file="${test-output}"/> + <basename + property="output-file-name" + file="${test-output}"/> + <mkdir dir="${junit-report-output}/xml"/> + <junitreport + todir="${junit-report-output}/xml" + tofile="${classname}.xml"> + <fileset dir="${output-dir}"> + <include name="${output-file-name}"/> + </fileset> + </junitreport> + <mkdir dir="${junit-report-output}/html"/> + <xslt + style="${testRoot}/JUNIT.XSL" + basedir="${junit-report-output}" + includes="${classname}.xml" + destdir="${junit-report-output}/html"/> + </target> + <target name="collect"> + <!-- + deprecated, each test.xml uses it, and we should remove, + eventually + --> + <echo + message="Deprecated. There is no need to call the collect task. It no longer does anything. Please remove from your test.xml file"/> + </target> + <target + name="summarizeFailure" + depends="checkFailure" + if="doFailure"> + <!-- + TODO: fix sdo junitFailureList.log goes in 'results', at + first. Then copied. Then coordinate with releng scripts + --> + <echo + append="true" + file="${buildDirectory}/junitFailureList.log">${plugin-name}${line.separator}</echo> + </target> + <target name="checkFailure"> + <condition property="doFailure"> + <not> + <equals + arg1="${suitejunitresult}" + arg2="0" + trim="true"/> + </not> + </condition> + </target> +</project> \ No newline at end of file