harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r633816 - in /harmony/enhanced/buildtest/trunk/infra: build.xml scripts/main.xml
Date Wed, 05 Mar 2008 11:14:06 GMT
Author: smishura
Date: Wed Mar  5 03:13:59 2008
New Revision: 633816

URL: http://svn.apache.org/viewvc?rev=633816&view=rev
Log:
Combine build.xml & scripts/main.xml into one file

Removed:
    harmony/enhanced/buildtest/trunk/infra/scripts/main.xml
Modified:
    harmony/enhanced/buildtest/trunk/infra/build.xml

Modified: harmony/enhanced/buildtest/trunk/infra/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/build.xml?rev=633816&r1=633815&r2=633816&view=diff
==============================================================================
--- harmony/enhanced/buildtest/trunk/infra/build.xml (original)
+++ harmony/enhanced/buildtest/trunk/infra/build.xml Wed Mar  5 03:13:59 2008
@@ -22,23 +22,172 @@
 
     <!-- Use this property on setup stage to specify particular 
          test suites to run -->
-    <property name="test.suites" value="*"/>
+    <property name="test.suites" value="*" />
 
     <!-- define only the properties used before installation 
          other properties should be defined in ${framework.properties.file} -->
-    <property name="root.dir" location="${basedir}"/>
-    <property name="adaptors.dir" location="${root.dir}/adaptors"/>
-    <property name="scripts.dir" location="${root.dir}/scripts"/>
-
-    <property name="framework.local.configuration.file" 
-              location="${root.dir}/framework.local.properties"/>
-    <property file="${framework.local.configuration.file}"/>
+    <property name="root.dir" location="${basedir}" />
+    <property name="adaptors.dir" location="${root.dir}/adaptors" />
+    <property name="scripts.dir" location="${root.dir}/scripts" />
+
+    <property name="framework.local.configuration.file"
+              location="${root.dir}/framework.local.properties" />
+    <property file="${framework.local.configuration.file}" />
+
+    <!-- ================================================================== 
+         ================================================================== -->
+    <property name="framework.properties.file"
+              location="${scripts.dir}/framework.properties" />
+    <property file="${framework.properties.file}" />
+
+    <property name="framework.implementation.file"
+              location="${scripts.dir}/framework.xml" />
+    <import file="${framework.implementation.file}" optional="true" />
+
+    <!-- create coma separated list of selected test suites -->
+    <dirset id="test.suites.dirs.ref"
+            dir="${adaptors.dir}"
+            includes="${test.suites}" />
+    <pathconvert pathsep=","
+                 property="test.suites.names.list"
+                 refid="test.suites.dirs.ref">
+        <flattenmapper />
+    </pathconvert>
+
+    <!-- For correct framework operation, all global properties defined 
+         by framework SHOULD be added to this set -->
+    <propertyset id="global.build.parameters.id">
+        <propertyref name="root.dir" />
+        <propertyref name="ant.home" />
+        <propertyref name="adaptors.dir" />
+        <propertyref name="scripts.dir" />
+        <propertyref name="framework.properties.file" />
+        <propertyref name="framework.implementation.file" />
+        <propertyref name="test.suites.names.list" />
+    </propertyset>
+
+    <!-- ================================================================== 
+                         Framework Setup Functionality
+         ================================================================== -->
+    <target name="setup"
+            depends="create-local-configuration, setup-framework, -save-suites-configuration,
+                        load-required-parameters, save-required-parameters" />
+
+    <target name="-save-suites-configuration" depends="define-ant-contrib">
+        <echo file="${selected.suites.configuration}"># autogenerated file containing
test run setup information
+
+# Selected test suites will be executed in the following order:${line.separator}</echo>
+        <echo file="${selected.suites.configuration}"
+              append="true"
+              message="test.suites.names.list=${test.suites.names.list}${line.separator}"
/>
+
+        <echo file="${selected.suites.configuration}" append="true">
+# This order has been obtained on the base of the following
+# information about dependencies between test suites:${line.separator}</echo>
+
+        <for list="${test.suites.names.list}" param="suite">
+            <sequential>
+                <echo file="${selected.suites.configuration}"
+                      append="true"
+                      message="@{suite}.parameters.depends=${@{suite}.parameters.depends}${line.separator}"
/>
+            </sequential>
+        </for>
+    </target>
+
+    <condition property="framework.local.config.exists">
+        <available file="${framework.local.configuration.file}" />
+    </condition>
+
+    <target name="create-local-configuration"
+            unless="framework.local.config.exists">
+        <!-- create the file for local BTI configuration -->
+        <echo file="${framework.local.configuration.file}">#
+# Any BTI framework local configuration properties 
+# should be specified in this file. 
+# For more information on which parameters can be configured see
+#     ${scripts.dir}/parameters.xml
+</echo>
+    </target>
 
     <!-- ================================================================== 
-                      Import BTI Framework command line UI
+                          Test Execution Functionality
          ================================================================== -->
-    <property name="framework.main.file" 
-              location="${scripts.dir}/main.xml"/>
-    <import file="${framework.main.file}" optional="true"/>
+    <target name="run"
+            depends="check-setup, init-framework, init-suites, setup-suites, run-suites"
/>
+
+    <target name="run-cc"
+            description="run-cc"
+            depends="check-setup, init-framework, setup-suites, check-status,
+                        create-cc-configuration">
+        <java jar="${ext.cc.location}/lib/cruisecontrol-launcher.jar"
+              dir="${cc.work.dir}"
+              fork="true">
+            <classpath>
+                <fileset dir="${ext.cc.location}/lib">
+                    <include name="*.jar" />
+                </fileset>
+            </classpath>
+            <sysproperty key="javax.management.builder.initial"
+                         value="mx4j.server.MX4JMBeanServerBuilder" />
+            <arg line="-configfile ${cc.config.file} -webapppath ${ext.cc.location}/webapps/cruisecontrol
-jmxport ${framework.parameters.cc.jmxport} -webport ${framework.parameters.cc.webport}" />
+            <jvmarg line="-Xmx700M" />
+        </java>
+    </target>
+
+    <target name="check-setup">
+        <fail>
+            <condition>
+                <not>
+                    <available file="${required.parameters.location}" />
+                </not>
+            </condition>...
+------
+ERROR: Could not find ${required.parameters.location}. Please, do 'setup' first.
+------
+        </fail>
+        <fail>
+            <condition>
+                <not>
+                    <available file="${selected.suites.configuration}" />
+                </not>
+            </condition>...
+------
+ERROR: Could not find ${selected.suites.configuration}. Please, do 'setup' first.
+------
+        </fail>
+    </target>
+
+    <target name="test-mail" depends="define-ant-contrib">
+        <xmlproperty file="${scripts.dir}/parameters.xml"
+                     collapseAttributes="true"
+                     semanticAttributes="true"
+                     prefix="framework" />
+        <ant antfile="${scripts.dir}/cc-exec-adaptor.xml">
+            <property name="suite.name" value="test-mail" />
+            <property name="test-mail.parameters.mail.from"
+                      value="Test-Mail@Test.Com" />
+            <property name="test-mail.parameters.cc.from"
+                      value="Test@Test.Com" />
+            <property name="test-mail.parameters.mail.summary"
+                      value="${root.dir}/.summary.txt" />
+            <property name="test-mail.parameters.cc.message"
+                      value="${root.dir}/README.txt" />
+            <property name="test-mail.parameters.cc.attachs"
+                      value="${root.dir}/README.txt,${root.dir}/build.xml" />
+            <property name="test-mail.parameters.mail.subject.suffix"
+                      value=" (ignore this message)" />
+            <property name="test-mail.parameters.mail.suppress.exelogs"
+                      value="true" />
+
+            <property name="mail.execution.status" value="TEST MAIL" />
+            <property name="thisbuildsuccessful" value="false" />
+        </ant>
+    </target>
+
+    <target name="clean"
+            description="clean"
+            depends="init-framework, clean-suites" />
+
+    <target name="distclean" description="distclean" />
 
 </project>



Mime
View raw message