Skip to content
Snippets Groups Projects
Commit 3926e9f6 authored by david_williams's avatar david_williams
Browse files

improvements in version checking

parent ef3d1314
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,9 @@
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
bin.includes = *.xml,\
META-INF/,\
.
bin.includes = META-INF/,\
.,\
versioningReportToHTML.xsl,\
test.xml,\
transformReportToHTML.xml
source.. = src/
......@@ -329,10 +329,9 @@ public class BuildTests extends TestCase {
public void testVersionCompare() throws Exception {
VersionLister versionLister = new VersionLister();
//String [] args = new String[] {"-listToConsole"};
String [] args = new String[] {"-testToReference", "WTPSDK152PLUSPATCHES"};
String [] args = new String[] {"-testToReference", "WTPSDK152PLUSPATCHES", "-listToReferenceFile"};
Object results = versionLister.run(args);
assertEquals("versionCompare failed. Return code was ", IPlatformRunnable.EXIT_OK, results);
assertEquals("There is an error in versioning. See full listing for details.", IPlatformRunnable.EXIT_OK, results);
}
}
......
<?xml version="1.0" encoding="UTF-8"?>
<project
name="testsuite"
default="run"
basedir=".">
<project name="testsuite" default="run" basedir=".">
<!-- The following properties should be passed into this script -->
<!-- ${eclipse-home} -->
<!-- ${buildDirectory} -->
<!-- ${buildLabel} -->
<!-- should be little need to change what's above -->
<property
name="plugin-name"
value="org.eclipse.wtp.releng.tests" />
<property
name="classname"
value="org.eclipse.wtp.releng.tests.TestBuild" />
<property
name="testType"
value="core-test" />
<property name="plugin-name"
value="org.eclipse.wtp.releng.tests" />
<property name="classname"
value="org.eclipse.wtp.releng.tests.TestBuild" />
<property name="testType" value="core-test" />
<!-- should be little need to change what's below -->
<echo message="basedir: ${basedir}" />
<echo message="eclipse-home: ${eclipse-home}" />
<echo message="buildDirectory: ${buildDirectory}" />
<echo message="buildLabel: ${buildLabel}" />
<echo message="plugin-name: ${plugin-name}" />
<echo message="plugin-directory: ${testPlugin}" />
<echo message="classname: ${classname}" />
<echo message="testType ${testType}" />
<echo message="buildId ${buildId}" />
<property
name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
<property
name="workspace"
value="${eclipse-home}/junitworkspaces/${plugin-name}" />
<property name="library-file"
value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml" />
<property name="workspace"
value="${eclipse-home}/junitworkspaces/${plugin-name}" />
<!-- This target holds all initialization code that needs to be done for -->
<!-- all tests that are to be run. Initialization for individual tests -->
<!-- should be done within the body of the suite target. -->
<target name="init">
<tstamp />
<delete>
<fileset
dir="${eclipse-home}"
includes="${plugin-name}.*xml" />
<fileset dir="${eclipse-home}"
includes="${plugin-name}.*xml" />
</delete>
<!-- make directory, in case path doesn't exist yet -->
<mkdir dir="${workspace}" />
<!-- but delete to make sure fresh contents-->
<delete
dir="${workspace}"
quiet="true" />
<delete dir="${workspace}" quiet="true" />
</target>
<!-- This target defines the tests that need to be run. -->
<target name="suite">
<ant
target="${testType}"
antfile="${library-file}"
dir="${eclipse-home}">
<property
name="data-dir"
value="${workspace}" />
<property
name="plugin-name"
value="${plugin-name}" />
<property
name="classname"
value="${classname}" />
<property
name="plugin-path"
value="${eclipse-home}/plugins/${plugin-name}" />
<property
name="buildDirectory"
value="${buildDirectory}" />
<property
name="buildLabel"
value="${buildLabel}" />
<ant target="${testType}"
antfile="${library-file}"
dir="${eclipse-home}">
<property name="data-dir"
value="${workspace}" />
<property name="plugin-name"
value="${plugin-name}" />
<property name="classname"
value="${classname}" />
<property name="plugin-path"
value="${eclipse-home}/plugins/${plugin-name}" />
<property name="vmargs"
value="-DbuildDirectory='${buildDirectory}' -DbuildLabel='${buildLabel}'" />
</ant>
<copy
failonerror="false"
file="${workspace}/.metadata/.log"
tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
<copy failonerror="false"
file="${workspace}/.metadata/.log"
tofile="${buildDirectory}/${buildLabel}/testResults/consolelogs/${plugin-name}.consolelog.txt" />
<!-- copy our particular xsl to web directory for prosperity-->
<copy todir="${buildDirectory}/${buildLabel}/"
flatten="true">
<fileset dir="${eclipse-home}/plugins/${testPlugin}"
includes="versioningReportToHTML.xsl" />
</copy>
<!-- and use it to create basic display -->
<xslt basedir="${buildDirectory}/${buildLabel}/"
includes="versioningReport_*"
destdir="${buildDirectory}/${buildLabel}/"
style="versioningReportToHTML.xsl"
force="true" />
<echo file="${buildDirectory}/${buildLabel}/versioningReportName.php">
<![CDATA[<?$versionReportFilename=versioningReport_${buildId}?>]]>
</echo>
</target>
<!-- This target holds code to cleanup the testing environment after -->
......@@ -102,20 +104,16 @@
<!-- This target runs the test suite. Any actions that need to happen -->
<!-- after all the tests have been run should go here. -->
<target
name="run"
depends="init,suite,cleanup">
<ant
target="collect"
antfile="${library-file}"
dir="${eclipse-home}">
<property
name="includes"
value="${plugin-name}.*xml" />
<property
name="output-file"
value="${plugin-name}.xml" />
<target name="run" depends="init,suite,cleanup">
<ant target="collect"
antfile="${library-file}"
dir="${eclipse-home}">
<property name="includes"
value="${plugin-name}.*xml" />
<property name="output-file"
value="${plugin-name}.xml" />
</ant>
</target>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project
name="xsl-conversion"
default="main"
basedir=".">
<!-- note: this file isn't used in test, just left here as a handy way to test transform
in workspace during development of xsl -->
<target
name="main"
description="Converts versioningReport_*.xml to produce versioningReport_*.html">
<xslt
in="versioningReport.xml"
out="versioningReport.html"
style="versioningReportToHTML.xsl"
force="true" />
</target>
</project>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<?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="versioningReport" />
</body>
</html>
</xsl:template>
<xsl:template match="versioningReport">
<h2>Versioning Report</h2>
<xsl:apply-templates select="versioningReportData" />
</xsl:template>
<xsl:template
name="errors"
match="versioningReportData">
<p>
For
<xsl:value-of select="@current" />
using
<xsl:value-of select="@id" />
as the reference.</p>
<h3>Bundles with versioning errors</h3>
<dl>
<xsl:for-each select="versioningCompare">
<xsl:if test="@kind = 'error'">
<dt style="font-weight: bold; color: crimson">
<xsl:value-of select="entry" />
</dt>
<dd style="font-family: monospace;"><xsl:value-of select="current" /> (current)</dd>
<dd style="font-family: monospace;"><xsl:value-of select="reference" /> (reference)</dd>
</xsl:if>
</xsl:for-each>
</dl>
<h3>Bundles with qualifier-only increases</h3>
<dl>
<xsl:for-each select="versioningCompare">
<xsl:if test="@kind = 'increase' and @field='qualifier'">
<dt style="font-weight: bold; color: gold">
<xsl:value-of select="entry" />
</dt>
<dd style="font-family: monospace"><xsl:value-of select="current" /> (current)</dd>
<dd style="font-family: monospace"><xsl:value-of select="reference" /> (reference)</dd>
</xsl:if>
</xsl:for-each>
</dl>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment