harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r547525 - in /harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot: ./ README.txt adaptor.xml framework.local.properties parameters.xml snapshots-cc-config.xml suite-cc-custom-config.xml
Date Fri, 15 Jun 2007 04:50:13 GMT
Author: smishura
Date: Thu Jun 14 21:50:12 2007
New Revision: 547525

URL: http://svn.apache.org/viewvc?view=rev&rev=547525
Log:
BTI 2.0: add draft automation for snapshots testing.

Added:
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties 
 (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml   (with
props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml 
 (with props)

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt Thu Jun 14 21:50:12
2007
@@ -0,0 +1,19 @@
+This is draft automation for snapshots testing:
+The snapshot's adaptor downloads and unpacks the latest snapshot. And all
+configured suites are run against snapshot's jre. (A list of suites for
+snapshot testing can be found in framework.local.properties file)
+
+So to run tests with snapshot the following steps should be done:
+1. Check out Build Test from SVN
+     svn co -r HEAD -N http://svn.apache.org/repos/asf/harmony/enhanced/buildtest/branches/2.0
+
+2. copy file adaptors/snapshot/framework.local.properties to the infra root
+
+3. Setup Build Test and required suites with the following command:
+     ant -Dtest.suites="snapshot,suite1,suite2" setup
+
+4. Set values of required parameters if necessary in generated file:
+     required-parameters.properties
+
+5. Run the tests in continuous mode with command:
+     ant -Dtest.suites="snapshot,suite1,suite2" run-cc

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml Thu Jun 14 21:50:12
2007
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+     
+         http://www.apache.org/licenses/LICENSE-2.0
+     
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License. -->
+
+<!-- ====================================================================== 
+                    BT Adaptor for Harmony Classlib Project
+     ====================================================================== -->
+<project name="snapshot" default="run" basedir=".">
+
+    <condition property="is.windows">
+        <os family="Windows" />
+    </condition>
+
+    <condition property="exe" value=".exe" else="">
+        <isset property="is.windows" />
+    </condition>
+    <condition property="snapshot.file"
+               value="latest-harmony-hdk-windows-x86.zip"
+               else="latest-harmony-hdk-linux-x86.tar.gz">
+        <isset property="is.windows" />
+    </condition>
+
+    <target name="setup" depends="download.snapshot" />
+
+    <property name="downloads.url"
+              value="http://people.apache.org/builds/harmony/snapshots" />
+
+    <property name="snapshot" location="${checkouts.dir}/snapshot" />
+    <condition property="is.zip">
+        <contains string="${snapshot.file}" substring=".zip" />
+    </condition>
+
+    <property name="snapshot.results.dir" location="${snapshot}/results" />
+
+    <target name="run" depends="-unzip,-gunzip,-svn.revision">
+        <delete dir="${snapshot.results.dir}" />
+        <mkdir dir="${snapshot.results.dir}" />
+    </target>
+
+    <target name="download.snapshot" depends="-setup-proxy">
+
+        <mkdir dir="${snapshot}" />
+        <get src="${downloads.url}/${snapshot.file}"
+             dest="${snapshot}/${snapshot.file}"
+             usetimestamp="true"
+             verbose="true" />
+    </target>
+
+    <target name="-unzip" if="is.zip">
+        <delete dir="${snapshot}/hdk" />
+        <unzip src="${snapshot}/${snapshot.file}" dest="${snapshot}" />
+    </target>
+
+    <target name="-setup-proxy" if="http.proxyHost">
+        <setproxy proxyhost="${http.proxyHost}" proxyport="${http.proxyPort}" />
+    </target>
+
+    <target name="-gunzip" unless="is.zip">
+
+        <delete dir="${snapshot}/hdk" />
+
+        <gunzip src="${snapshot}/${snapshot.file}" dest="${snapshot}" />
+        <untar dest="${snapshot}">
+            <fileset dir="${snapshot}">
+                <include name="*.tar" />
+            </fileset>
+        </untar>
+    </target>
+
+    <target name="-svn.revision" depends="-unzip,-gunzip">
+
+        <!-- rename 'harmony-hdk-rXXXXXX' to 'hdk' dir -->
+        <dirset id="snapshot.dir.id"
+                dir="${snapshot}"
+                includes="harmony-hdk-*" />
+        <pathconvert property="snapshot.path" refid="snapshot.dir.id" />
+        <basename file="${snapshot.path}" property="snapshot.name" />
+        <move file="${snapshot}/${snapshot.name}" tofile="${snapshot}/hdk" />
+
+        <!-- store snapshot svn revision -->
+        <echo file="${svn.revision.file}"
+              message="svn.revision=${snapshot.name}" />
+
+        <!-- restore file permissions on extracted files -->
+        <chmod perm="a+x">
+            <fileset dir="${snapshot}/hdk/jdk/jre/bin">
+                <include name="java" />
+            </fileset>
+            <fileset dir="${snapshot}/hdk/jdk/bin">
+                <include name="*" />
+            </fileset>
+        </chmod>
+    </target>
+
+    <target name="clean">
+        <delete dir="${snapshot}" />
+    </target>
+
+    <!--                     -->
+    <!-- snapshot publishers -->
+    <!--                     -->
+    <target name="publish-axis2_app">
+        <mkdir dir="${snapshot.results.dir}/axis2_app" />
+
+        <concat destfile="${snapshot.results.dir}/axis2_app/index.html">
+            <header trimleading="yes" filtering="no">
+                &lt;html&gt;
+            </header>
+
+            <fileset file="${results.dir}/axis2_app/Axis2-message.txt" />
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="(.*)" replace="\1&lt;br/&gt;" />
+                </tokenfilter>
+            </filterchain>
+
+            <footer trimleading="yes" filtering="no">
+                &lt;/html&gt;
+            </footer>
+        </concat>
+    </target>
+
+    <target name="publish-JettyScenario">
+        <mkdir dir="${snapshot.results.dir}/JettyScenario" />
+        <copy todir="${snapshot.results.dir}/JettyScenario">
+            <fileset dir="${results.dir}/JettyScenario/html">
+                <include name="**" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="publish-dacapo">
+        <mkdir dir="${snapshot.results.dir}/dacapo" />
+        <concat destfile="${snapshot.results.dir}/dacapo/index.html">
+            <header trimleading="yes" filtering="no">
+                &lt;html&gt;
+            </header>
+
+            <fileset file="${results.dir}/dacapo/dacapo_output.txt"/>
+            <filterchain>
+                <linecontainsregexp>
+                    <regexp pattern="^===== DaCapo.*"/>
+                </linecontainsregexp>
+                <tokenfilter>
+                    <replaceregex pattern="=$" replace="=&lt;br/&gt;"/>
+                </tokenfilter>
+            </filterchain>
+            
+            <footer trimleading="yes" filtering="no">
+                &lt;/html&gt;
+            </footer>
+        </concat>
+    </target>
+
+    <target name="publish-ehwa">
+        <mkdir dir="${snapshot.results.dir}/ehwa" />
+        <concat destfile="${snapshot.results.dir}/ehwa/index.html">
+            <header trimleading="yes" filtering="no">
+                &lt;html&gt;
+            </header>
+
+            <fileset file="${results.dir}/ehwa/EHWA-message.txt"/>
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="(.*)" replace="\1&lt;br/&gt;"/>
+                </tokenfilter>
+            </filterchain>
+            
+            <footer trimleading="yes" filtering="no">
+                &lt;/html&gt;
+            </footer>
+        </concat>
+    </target>
+
+    <target name="publish-scimark">
+        <mkdir dir="${snapshot.results.dir}/scimark" />
+
+        <concat destfile="${snapshot.results.dir}/scimark/index.html">
+            <header trimleading="yes" filtering="no">
+                &lt;html&gt;
+            </header>
+
+            <fileset file="${results.dir}/scimark/score.txt" />
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="(.*)" replace="\1&lt;br/&gt;" />
+                </tokenfilter>
+            </filterchain>
+
+            <footer trimleading="yes" filtering="no">
+                &lt;/html&gt;
+            </footer>
+        </concat>
+    </target>
+
+    <target name="publish-struts_test">
+        <mkdir dir="${snapshot.results.dir}/struts_test" />
+        <copy todir="${snapshot.results.dir}/struts_test">
+            <fileset dir="${results.dir}/struts_test/test-results/html">
+                <include name="**" />
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="publish-tomcat-scenario">
+        <mkdir dir="${snapshot.results.dir}/tomcat-scenario" />
+        <echo file="${snapshot.results.dir}/tomcat-scenario/index.html">
+&lt;html&gt;
+NO OUTPUT
+&lt;/html&gt;
+        </echo>
+    </target>
+
+</project>
+

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/adaptor.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties Thu
Jun 14 21:50:12 2007
@@ -0,0 +1,40 @@
+# Do you want to send email notifications and to where? and from whom?
+#framework.parameters.usemail=
+#framework.parameters.usemail.to=
+#framework.parameters.usemail.from=
+
+#
+axis2_app.parameters.depends=snapshot
+axis2_app.parameters.required.tested.runtime=${snapshot.parameters.shared.jre}
+axis2_app.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+dacapo.parameters.depends=snapshot
+dacapo.parameters.required.jdk.to.test.home=${snapshot.parameters.shared.jre}
+dacapo.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+ehwa.parameters.depends=snapshot
+ehwa.parameters.required.tested.runtime=${snapshot.parameters.shared.jre}
+ehwa.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+JettyScenario.parameters.depends=snapshot
+JettyScenario.parameters.required.jetty.server.jvm=${snapshot.parameters.shared.jvm.location}
+JettyScenario.parameters.required.scenario.framework.jvm=${snapshot.parameters.shared.jvm.location}
+JettyScenario.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+scimark.parameters.depends=snapshot
+scimark.parameters.required.tested.runtime=${snapshot.parameters.shared.jvm.location}
+scimark.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+struts_test.parameters.depends=snapshot
+struts_test.parameters.required.req.test.java.home=${snapshot.parameters.shared.jre}
+struts_test.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml
+
+#
+tomcat-scenario.parameters.depends=snapshot
+tomcat-scenario.parameters.required.tested.runtime=${snapshot.parameters.shared.jre}
+tomcat-scenario.parameters.cc.config=${adaptors.dir}/snapshot/suite-cc-custom-config.xml

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/framework.local.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml Thu Jun 14 21:50:12
2007
@@ -0,0 +1,16 @@
+<parameters>
+
+    <required>
+        <file value="${snapshot.file}" />
+    </required>
+
+    <shared>
+        <results.dir value="${checkouts.dir}/snapshot/results"/>
+        <jre value="${checkouts.dir}/snapshot/hdk/jdk/jre"/>
+        <jdk value="${checkouts.dir}/snapshot/hdk/jdk"/>
+        <jvm.location value="${checkouts.dir}/snapshot/hdk/jdk/jre/bin/java${exe}"/>
+        <svn.revision.file location="${checkouts.dir}/snapshot/svn.revision"/>
+    </shared>
+
+    <cc config="${adaptors.dir}/${suite.name}/snapshots-cc-config.xml"/>
+</parameters>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/parameters.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml Thu
Jun 14 21:50:12 2007
@@ -0,0 +1,72 @@
+<cruisecontrol>
+
+    <!-- Keep this tag if you want to see any parameter value accessible 
+         from adaptor.xml here -->
+    <!-- @BT.PARAMETERS.INCLUDE@ -->
+    
+    <!-- Tag resolved to the name of 
+         the test suite this config is related to. -->
+    <project name="@BT.PROJECT@" buildafterfailed="false">
+
+        <listeners>
+            <!-- Resolved to <currentbuildstatuslistener file="${logs.dir}/...">
+                 Should be here if there are any suites depending
+                 on run status of this suite -->
+            <!-- @BT.LISTENER@ -->
+        </listeners>
+
+        <bootstrappers>
+            <!-- Resolved to 
+                    <svnbootstrapper> 
+                 if we use SVN for sources, i.e. 
+                    ${suite.name}.parameters.cc.usesvn="${sources.location}"
+                 is set -->
+            <antbootstrapper
+                 anthome='${ant.home}'
+                 antWorkingDir='${root.dir}'
+                 timeout='5000000'
+                 buildfile='${adaptors.dir}/snapshot/adaptor.xml'
+                 target='download.snapshot'>
+                <property name='checkouts.dir' value='${checkouts.dir}'/>
+                <property name='snapshot.file' value='${snapshot.file}'/>
+                <property name='http.proxyHost' value='${http.proxyHost}'/>
+                <property name='http.proxyPort' value='${http.proxyPort}'/>
+            </antbootstrapper >
+        </bootstrappers>
+
+        <modificationset quietperiod="${framework.parameters.cc.quietperiod}">
+            <!-- Tag Resolution Rules: 
+                - in case of defined SVN (@{suite.name}.parameters.cc.usesvn),
+                  resolved to
+                    <svn LocalWorkingCopy="${path.to.local.svn.repository}"/>
+                - in case of defined trigger (@{suite.name}.parameters.cc.trigger),
+                  resolved to
+                    <filesystem folder="${path.to.trigger.file}"
+                - for any dependency it is resolved to
+                    <buildstatus logdir='${path.to.log.for.some.suite}'/>
+                  if the dependency uses svn, it is aslo resolved to
+                    <svn localWorkingCopy=../>
+                - in any case it is additionally resolved to
+                    <forceonly/>
+            -->
+            <filesystem folder="${checkouts.dir}/snapshot/${snapshot.file}" />
+        </modificationset>
+
+        <schedule interval="${framework.parameters.cc.interval}">
+            <!-- This tag MUST be present!
+                 It makes correct call to adaptor's run target -->
+            <!-- @BT.ADAPTORCALL@ -->
+        </schedule>
+
+        <log>
+            <!-- @BT.TEST.RESULTS@ -->
+        </log>
+
+        <publishers>
+            <!-- Keep it if you want to use custom ant publishers
+                 specified for test suite by cc.publisher parameter -->
+            <!-- @BT.PUBLISHER@ -->
+        </publishers>
+
+    </project>
+</cruisecontrol>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/snapshots-cc-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml?view=auto&rev=547525
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml Thu
Jun 14 21:50:12 2007
@@ -0,0 +1,70 @@
+<cruisecontrol>
+
+    <!-- Keep this tag if you want to see any parameter value accessible 
+         from adaptor.xml here -->
+    <!-- @BT.PARAMETERS.INCLUDE@ -->
+    
+    <!-- Tag resolved to the name of 
+         the test suite this config is related to. -->
+    <project name="@BT.PROJECT@" buildafterfailed="false">
+
+        <listeners>
+            <!-- Resolved to <currentbuildstatuslistener file="${logs.dir}/...">
+                 Should be here if there are any suites depending
+                 on run status of this suite -->
+            <!-- @BT.LISTENER@ -->
+        </listeners>
+
+        <bootstrappers>
+            <!-- Resolved to 
+                    <svnbootstrapper> 
+                 if we use SVN for sources, i.e. 
+                    ${suite.name}.parameters.cc.usesvn="${sources.location}"
+                 is set -->
+            <!-- @BT.BOOTSTRAPPER@ -->
+        </bootstrappers>
+
+        <modificationset quietperiod="${framework.parameters.cc.quietperiod}">
+            <!-- Tag Resolution Rules: 
+                - in case of defined SVN (@{suite.name}.parameters.cc.usesvn),
+                  resolved to
+                    <svn LocalWorkingCopy="${path.to.local.svn.repository}"/>
+                - in case of defined trigger (@{suite.name}.parameters.cc.trigger),
+                  resolved to
+                    <filesystem folder="${path.to.trigger.file}"
+                - for any dependency it is resolved to
+                    <buildstatus logdir='${path.to.log.for.some.suite}'/>
+                  if the dependency uses svn, it is aslo resolved to
+                    <svn localWorkingCopy=../>
+                - in any case it is additionally resolved to
+                    <forceonly/>
+            -->
+            <buildstatus logdir="logs/snapshot"/>
+        </modificationset>
+
+        <schedule interval="${framework.parameters.cc.interval}">
+            <!-- This tag MUST be present!
+                 It makes correct call to adaptor's run target -->
+            <!-- @BT.ADAPTORCALL@ -->
+        </schedule>
+
+        <log>
+            <!-- @BT.TEST.RESULTS@ -->
+        </log>
+
+        <publishers>
+            <!-- Keep it if you want to use custom ant publishers
+                 specified for test suite by cc.publisher parameter -->
+            <!-- @BT.PUBLISHER@ -->
+            <antpublisher
+                 anthome='${ant.home}'
+                 antWorkingDir='${root.dir}'
+                 buildfile='${adaptors.dir}/snapshot/adaptor.xml'
+                 target='publish-${project.name}'>
+                <property name='results.dir' value='${results.dir}'/>
+                <property name='checkouts.dir' value='${checkouts.dir}'/>
+            </antpublisher>
+        </publishers>
+
+    </project>
+</cruisecontrol>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/snapshot/suite-cc-custom-config.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message