You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2007/05/16 07:39:32 UTC

svn commit: r538438 - in /harmony/enhanced/buildtest/branches/2.0/scripts: cc-exec-adaptor.xml cc-project.xml parameters.xml templates/cc-project-template.xml

Author: smishura
Date: Tue May 15 22:39:31 2007
New Revision: 538438

URL: http://svn.apache.org/viewvc?view=rev&rev=538438
Log:
Apply patch from HARMONY-3501(BT Infra Improvment) that removes cyclic imports

Added:
    harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml   (with props)
Modified:
    harmony/enhanced/buildtest/branches/2.0/scripts/cc-project.xml
    harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml
    harmony/enhanced/buildtest/branches/2.0/scripts/templates/cc-project-template.xml

Added: harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml?view=auto&rev=538438
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml Tue May 15 22:39:31 2007
@@ -0,0 +1,61 @@
+<?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. -->
+
+<!-- ====================================================================== 
+                          CC to Ant Adaptors Execution 
+     ====================================================================== -->
+<project name="cc-ant" default="call" basedir=".">
+
+    <property file="${properties.dump.file}"/>
+    <property file="${framework.properties.file}"/>
+    <import file="${framework.implementation.file}"/>
+
+    <!-- Called from CC to launch the test suite named ${test.suite} -->
+    <target name="cc-run" depends="define-ant-contrib">
+        <property name="suite.adaptor.dir" value="${root.dir}/adaptors/${suite.name}"/>
+        <log message="Test Suite '${suite.name}' execution. Repository updated: ${repository.updated}"/>
+        <ant dir="${root.dir}/adaptors/${suite.name}" 
+             antfile="adaptor.xml" 
+             target="run"
+             inheritAll="true"/>
+    </target>
+
+    <!-- Called from CC to launch the custom ant publisher for test suite -->
+    <target name="cc-publish-custom" 
+            depends="define-ant-contrib"
+            if="framework.parameters.usemail">
+        <dirname property="publisher.dir" file="${publisher.location}"/>
+        <log message="Calling Publisher ${publisher.location} at ${publisher.dir} for ${suite.name}"/>
+        <ant dir="${publisher.dir}" 
+             antfile="${publisher.location}" 
+             target="publish"
+             inheritAll="true"/>
+    </target>
+
+    <!-- Called from CC to launch the default ant publisher for test suite -->
+    <target name="cc-publish" 
+            depends="define-ant-contrib"
+            if="framework.parameters.usemail">
+        <dirname property="publisher.dir" file="${publisher.location}"/>
+        <log message="Calling Publisher ${publisher.location} at ${publisher.dir} for ${suite.name}"/>
+        <ant dir="${publisher.dir}" 
+             antfile="${publisher.location}" 
+             target="publish"
+             inheritAll="true"/>
+    </target>
+
+</project>

Propchange: harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/cc-project.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/cc-project.xml?view=diff&rev=538438&r1=538437&r2=538438
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/cc-project.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/cc-project.xml Tue May 15 22:39:31 2007
@@ -22,40 +22,6 @@
      ====================================================================== -->
 <project name="cc" default="fetch-depends" basedir=".">
 
-    <import file="framework.xml"/>
-
-    <!--
-                        CC-project Retated Functionality
-    -->
-
-    <!-- loads properties passed from CC-config -->
-    <target name="load-properties">
-        <property file="${parameters.dump.file}"/>
-        <property file="${framework.properties.file}"/>
-    </target>
-
-    <!-- is called from CC to launch the test suite named ${test.suite} -->
-    <target name="cc-run" depends="load-properties, define-ant-contrib">
-        <property name="suite.adaptor.dir" value="${root.dir}/adaptors/${suite.name}"/>
-        <log message="Test Suite '${suite.name}' execution. Repository updated: ${repository.updated}"/>
-        <ant dir="${root.dir}/adaptors/${suite.name}" 
-             antfile="adaptor.xml" 
-             target="run"
-             inheritAll="true"/>
-    </target>
-
-    <!-- is called from CC to launch the custom ant publisher for ${test.suite} -->
-    <target name="cc-publish" 
-            depends="load-properties, define-ant-contrib"
-            if="framework.parameters.usemail">
-        <dirname property="publisher.dir" file="${publisher.location}"/>
-        <log message="Calling Publisher ${publisher.location} at ${publisher.dir} for ${suite.name}"/>
-        <ant dir="${publisher.dir}" 
-             antfile="${publisher.location}" 
-             target="publish"
-             inheritAll="true"/>
-    </target>
-
     <!--
                         Framework Retated Functionality
     -->
@@ -93,6 +59,25 @@
                 <property name="@{suite.name}.parameters.cc.file.location"
                           location="${cc.work.dir}/${@{suite.name}.parameters.cc.filename}"/>
                 <delete file="${@{suite.name}.parameters.cc.file.location}"/>
+
+                <!-- Create the property files for inclusion into the 
+                     CC-config file for @{suite.name}, and for passing
+                     them through the CC to adaptors -->
+                <var name="tmp.cc-props-file"
+                     value="${cc.work.dir}/cc-@{suite.name}.properties"/>
+                <var name="tmp.ant-props-file"
+                     value="${cc.work.dir}/@{suite.name}.properties"/>
+                <antcall target="make-property-files" inheritAll="true">
+                    <param name="suite" value="@{suite.name}"/>
+                    <param name="cc-params-file" value="${tmp.cc-props-file}"/>
+                    <param name="ant-params-file" value="${tmp.ant-props-file}"/>
+                    <propertyset>
+                        <propertyset refid="@{suite.name}.parameters.id"/>
+                        <!-- do map keys to separate the properties 
+                             need to be passed to the project -->
+                        <globmapper from="*" to="-TO-PASS-.*"/>
+                    </propertyset>
+                </antcall>
                 
                 <if><!-- check for custom configuration file -->
                     <isset property="@{suite.name}.parameters.cc.config"/>
@@ -117,7 +102,10 @@
                 <!-- insert 'MUSTHAVE' project name and call to adaptor -->
                 <insert-adaptorcall
                     suite="@{suite.name}"
-                    ccfile="${@{suite.name}.parameters.cc.file.location}"/>
+                    ccfile="${@{suite.name}.parameters.cc.file.location}"
+                    ccpropsfile="${tmp.cc-props-file}"
+                    antpropsfile="${tmp.ant-props-file}"
+                    />
                 <!-- insert svn using -->
                 <if>
                     <isset property="@{suite.name}.parameters.cc.usesvn"/>
@@ -150,13 +138,18 @@
                         <insert-publisher
                             suite="@{suite.name}"
                             publisher="${@{suite.name}.parameters.cc.publisher}"
-                            ccfile="${@{suite.name}.parameters.cc.file.location}"/>
+                            ccfile="${@{suite.name}.parameters.cc.file.location}"
+                            ccpropsfile="${tmp.cc-props-file}"
+                            antpropsfile="${tmp.ant-props-file}"
+                            target="cc-publish-custom"/>
                     </then>
                     <else>
                         <insert-publisher
                             suite="@{suite.name}"
                             publisher="${scripts.dir}/publisher.xml"
-                            ccfile="${@{suite.name}.parameters.cc.file.location}"/>
+                            ccfile="${@{suite.name}.parameters.cc.file.location}"
+                            ccpropsfile="${tmp.cc-props-file}"
+                            antpropsfile="${tmp.ant-props-file}"/>
                     </else>
                     </if>
                 </then>
@@ -210,7 +203,7 @@
     </target>
 
     <!-- Creates the CC properties file for specified by ${suite} project -->
-    <target name="make-parameter-files">
+    <target name="make-property-files">
         <propertyselector 
             property="tmp.params.list"
             delimiter=","
@@ -245,25 +238,9 @@
     <macrodef name="insert-adaptorcall">
         <attribute name="suite"/>
         <attribute name="ccfile"/>
+        <attribute name="ccpropsfile"/>
+        <attribute name="antpropsfile"/>
         <sequential>
-            <!-- Create the parameter files for inclusion into the 
-                 CC-config file for @{suite} project, and for passing
-                 them through the CC to adaptors -->
-            <var name="tmp.cc-params-file"
-                 value="${cc.work.dir}/cc-@{suite}.properties"/>
-            <var name="tmp.ant-params-file"
-                 value="${cc.work.dir}/@{suite}.properties"/>
-            <antcall target="make-parameter-files" inheritAll="true">
-                <param name="suite" value="@{suite}"/>
-                <param name="cc-params-file" value="${tmp.cc-params-file}"/>
-                <param name="ant-params-file" value="${tmp.ant-params-file}"/>
-                <propertyset>
-                    <propertyset refid="@{suite}.parameters.id"/>
-                    <!-- do map keys to separate the properties 
-                         need to be passed to the project -->
-                    <globmapper from="*" to="-TO-PASS-.*"/>
-                </propertyset>
-            </antcall>
             <replace file="@{ccfile}">
                 <!-- Define the name of the project as name of a current 
                      test suite -->
@@ -273,7 +250,7 @@
                 <!-- Include the parameters known by test suite -->
                 <replacefilter 
                     token="&lt;!-- @BT.PARAMETERS.INCLUDE@ --&gt;" 
-                    value="&lt;property file='${tmp.cc-params-file}'/&gt;"
+                    value="&lt;property file='@{ccpropsfile}'/&gt;"
                 />
                 <replacefilter 
                     token="&lt;!-- @BT.LISTENER@ --&gt;" 
@@ -284,11 +261,11 @@
                     value="&lt;ant anthome='${ant.home}'@NL@
                 antWorkingDir='${root.dir}'@NL@
                 timeout='${cc.project.execution.timeout}'@NL@
-                buildfile='${root.dir}/scripts/cc-project.xml'@NL@
+                buildfile='${root.dir}/scripts/cc-exec-adaptor.xml'@NL@
                 target='cc-run'&gt;@NL@
                &lt;property name='suite.name' value='@{suite}'/&gt;@NL@
-               &lt;property name='parameters.dump.file'@NL@
-                         value='${tmp.ant-params-file}'/&gt;@NL@
+               &lt;property name='properties.dump.file'@NL@
+                         value='@{antpropsfile}'/&gt;@NL@
            &lt;/ant&gt;@NL@"/>
             </replace>
         </sequential>
@@ -455,25 +432,10 @@
         <attribute name="suite"/>
         <attribute name="publisher"/>
         <attribute name="ccfile"/>
+        <attribute name="ccpropsfile"/>
+        <attribute name="antpropsfile"/>
+        <attribute name="target" default="cc-publish"/>
         <sequential>
-            <!-- Create the parameter files for inclusion into the 
-                 CC-config file for @{suite} project, and for passing
-                 them through the CC to adaptors -->
-            <var name="tmp.cc-params-file"
-                 value="${cc.work.dir}/cc-@{suite}.properties"/>
-            <var name="tmp.ant-params-file"
-                 value="${cc.work.dir}/@{suite}.properties"/>
-            <antcall target="make-parameter-files" inheritAll="true">
-                <param name="suite" value="@{suite}"/>
-                <param name="cc-params-file" value="${tmp.cc-params-file}"/>
-                <param name="ant-params-file" value="${tmp.ant-params-file}"/>
-                <propertyset>
-                    <propertyset refid="@{suite}.parameters.id"/>
-                    <!-- do map keys to separate the properties 
-                         need to be passed to the project -->
-                    <globmapper from="*" to="-TO-PASS-.*"/>
-                </propertyset>
-            </antcall>
             <replace file="@{ccfile}">
                 <!-- Define the name of the project as name of a current 
                      test suite -->
@@ -483,7 +445,7 @@
                 <!-- Include the parameters known by test suite -->
                 <replacefilter 
                     token="&lt;!-- @BT.PARAMETERS.INCLUDE@ --&gt;" 
-                    value="&lt;property file='${tmp.cc-params-file}'/&gt;"
+                    value="&lt;property file='@{ccpropsfile}'/&gt;"
                 />
                 <replacefilter 
                     token="&lt;!-- @BT.LISTENER@ --&gt;" 
@@ -495,12 +457,12 @@
                 anthome='${ant.home}'@NL@
                 timeout='${cc.project.execution.timeout}'@NL@
                 antWorkingDir='${root.dir}'@NL@
-                buildfile='${root.dir}/scripts/cc-project.xml'@NL@
-                target='cc-publish'&gt;@NL@
+                buildfile='${root.dir}/scripts/cc-exec-adaptor.xml'@NL@
+                target='@{target}'&gt;@NL@
                &lt;property name='suite.name' value='@{suite}'/&gt;@NL@
                &lt;property name='publisher.location' value='@{publisher}'/&gt;@NL@
-               &lt;property name='parameters.dump.file'@NL@
-                         value='${tmp.ant-params-file}'/&gt;@NL@
+               &lt;property name='properties.dump.file'@NL@
+                         value='@{antpropsfile}'/&gt;@NL@
            &lt;/antpublisher&gt;@NL@"/>
             </replace>
         </sequential>

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml?view=diff&rev=538438&r1=538437&r2=538438
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml Tue May 15 22:39:31 2007
@@ -6,9 +6,23 @@
         <dolog value="false" description="Do you want to see Framework execution log?"/>
     </optional>
     
-    <cc doclean="false" description="Do clean working CC directory before execution?"/>
-    <cc webport="8080" description="The port on which CC will make its web publishing"/>
-    <cc jmxport="8000" description="The port for CC's JMX console."/>
+    <cc>
+        <webport 
+            value="8080" 
+            description="The port on which CC will make its web publishing"/>
+        <jmxport
+            value="8000" 
+            description="The port for CC's JMX console."/>
+        <quietperiod 
+            value="30" 
+            description="The number of seconds since last SVN modification to wait before Test Suites execution."/>
+        <interval 
+            value="300" 
+            description="Interval period in seconds to check for necessity of Test Suite Execution."/>
+        <doclean 
+            value="false" 
+            description="Do clean working CC directory before execution?"/>
+    </cc>
 
     <usemail 
         description="Specify the SMTP server to be used for E-Mail Notifications">

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/templates/cc-project-template.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/templates/cc-project-template.xml?view=diff&rev=538438&r1=538437&r2=538438
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/templates/cc-project-template.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/templates/cc-project-template.xml Tue May 15 22:39:31 2007
@@ -24,7 +24,7 @@
             <!-- @BT.BOOTSTRAPPER@ -->
         </bootstrappers>
 
-        <modificationset quietperiod="60">
+        <modificationset quietperiod="${framework.parameters.cc.quietperiod}">
             <!-- Tag Resolution Rules: 
                 - in case of defined SVN (@{suite.name}.parameters.cc.usesvn),
                   resolved to
@@ -42,7 +42,7 @@
             <!-- @BT.MODIFICATIONSET@ -->
         </modificationset>
 
-        <schedule interval="300">
+        <schedule interval="${framework.parameters.cc.interval}">
             <!-- This tag MUST be present!
                  It makes correct call to adaptor's run target -->
             <!-- @BT.ADAPTORCALL@ -->