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/08 07:44:46 UTC

svn commit: r536061 - in /harmony/enhanced/buildtest/branches/2.0: adaptors/classlib/adaptor.xml adaptors/drlvm/adaptor.xml adaptors/drlvm/parameters.xml scripts/framework.xml

Author: smishura
Date: Mon May  7 22:44:45 2007
New Revision: 536061

URL: http://svn.apache.org/viewvc?view=rev&rev=536061
Log:
Apply patch form HARMONY-3501 that fixes for suite failure status handling: (BT Infra Improvement)

Modified:
    harmony/enhanced/buildtest/branches/2.0/adaptors/classlib/adaptor.xml
    harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/adaptor.xml
    harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/parameters.xml
    harmony/enhanced/buildtest/branches/2.0/scripts/framework.xml

Modified: harmony/enhanced/buildtest/branches/2.0/adaptors/classlib/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/classlib/adaptor.xml?view=diff&rev=536061&r1=536060&r2=536061
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/classlib/adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/classlib/adaptor.xml Mon May  7 22:44:45 2007
@@ -43,41 +43,22 @@
         <svn-co url="${svn.url}" trunk="${trunk.dir}"/>
     </target>
     
-    <target name="run" depends="-set-properties">
+    <target name="run">
         <ant target="fetch-depends" 
              dir="${trunk.dir}" 
-             inheritAll="false">
-        </ant>
-
-        <exec executable="${sh}" dir="${trunk.dir}" failonerror="true">
-            <arg line="${cmd.prefix} ${cmd}"/>
-            <arg line="rebuild"/>
-        </exec>
+             inheritAll="false"/>
+        <!-- Use BTI staff to execute Ant Build in new process -->
+        <exec-ant dir="${trunk.dir}" targets="rebuild">
+            <!-- workaround on classlib-build's InvocationTargetException -->
+            <jvmarg line="-Xmx1000M"/>
+        </exec-ant>
     </target>
 
-    <target name="clean" depends="-set-properties">
+    <target name="clean">
         <ant target="clean" 
              dir="${trunk.dir}" 
              inheritAll="false">
         </ant>
-    </target>
-
-    <target name="-set-properties" depends="-set-properties-win, -set-properties-other"/>
-
-    <condition property="is.windows">
-        <os family="windows" />
-    </condition>
-
-    <target name="-set-properties-win" if="is.windows">
-        <property name="sh" value="cmd"/>
-        <property name="cmd.prefix" value="/c"/>
-        <property name="cmd" value='"${ant.home}/bin/ant.bat"'/>
-    </target>
-
-    <target name="-set-properties-other" unless="is.windows">
-        <property name="sh" value="sh"/>
-        <property name="cmd.prefix" value=""/>
-        <property name="cmd" value='"${ant.home}/bin/ant"'/>
     </target>
 
 </project>

Modified: harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/adaptor.xml?view=diff&rev=536061&r1=536060&r2=536061
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/adaptor.xml Mon May  7 22:44:45 2007
@@ -20,6 +20,17 @@
      ====================================================================== -->
 <project name="drlvm" default="run" basedir=".">
 
+    <!-- platform dependent suffix for executables, 
+         used in parameters.xml for 'path to jvm' definition -->
+    <condition property="exe" value=".exe" else="">
+        <os family="windows" />
+    </condition>
+
+    <!-- define build configuration, 
+         used in parameters.xml for assignment the value to shared parameter -->
+    <property name="build.config" 
+              value="${drlvm.parameters.optional.build.cfg}"/>
+
     <!-- do setup of the drlvm workspace -->
     <target name="setup">
         <description>
@@ -44,62 +55,31 @@
     </target>
 
     <target name="run" 
-            description="Checks DRLVM trunk can be build." 
-            depends="-set-properties">
-        <exec executable="${sh}" dir="${trunk.dir}/build" failonerror="true">
-            <arg line="${cmd.prefix} ${cmd}"/>
-            <arg line="-Dproxy.host.vm=${http.proxyHost} -Dproxy.port.vm=${http.proxyPort}"/>
-            <arg line="-Dexternal.dep.CLASSLIB.loc=${classlib.trunk}"/>
-            <arg line="clean update" />
-        </exec>
-        <!-- do build separated of update (because of the bug with c.compiler 
-             dereferencing at the first time after cpptasks.jar has been 
-             downloaded) -->
-        <exec executable="${sh}" dir="${trunk.dir}/build" failonerror="true">
-            <arg line="${cmd.prefix} ${cmd}"/>
-            <arg line="-Dproxy.host.vm=${http.proxyHost} -Dproxy.port.vm=${http.proxyPort}"/>
-            <arg line="-Ddeploy.canonical.flag=true"/>
-            <arg line="-Dbuild.cfg=release"/>
-            <arg line="-Dexternal.dep.CLASSLIB.loc=${classlib.trunk}"/>
-            <arg line="build" />
-        </exec>
+            description="Checks DRLVM trunk can be build."> 
+        <drlvm-build targets="clean update"/>
+        <drlvm-build targets="build"/>
     </target>
 
-    <target name="clean" depends="-set-properties">
-        <exec executable="${sh}" dir="${trunk.dir}/build" failonerror="true">
-            <arg line="${cmd.prefix} ${cmd}"/>
-            <arg line="-Dproxy.host.vm=${http.proxyHost} -Dproxy.port.vm=${http.proxyPort}"/>
-            <arg line="-Ddeploy.canonical.flag=true"/>
-            <arg line="-Dbuild.cfg=release"/>
-            <arg line="-Dexternal.dep.CLASSLIB.loc=${classlib.trunk}"/>
-            <arg line="clean" />
-        </exec>
+    <target name="clean">
+        <drlvm-build targets="clean"/>
     </target>
 
-    <!-- platform depending configuration properties -->
-    <condition property="is.windows">
-        <os family="windows" />
-    </condition>
-
-    <condition property="exe" value=".exe" else="">
-        <os family="windows" />
-    </condition>
-
-    <target name="-set-properties" depends="-set-properties-win, -set-properties-other"/>
-    
-    <target name="-set-properties-win" if="is.windows">
-        <property name="sh" value="cmd" />
-        <property name="cmd.prefix" value="/c" />
-        <property name="cmd" value="build.bat" />
-        <property name="cc" value="msvc" />
-    </target>
-
-    <target name="-set-properties-other" unless="is.windows">
-        <property name="sh" value="sh" />
-        <property name="cmd.prefix" value="" />
-        <property name="cmd" value="build.sh" />
-        <property name="cc" value="gcc" />
-    </target>
+    <macrodef name="drlvm-build">
+        <attribute name="targets"/>
+        <sequential>
+            <!-- Use BTI staff to execute Ant Build in new process -->
+            <exec-ant dir="${trunk.dir}/build"
+                      file="make/build.xml"
+                      targets="@{targets}"
+                      lib="${trunk.dir}/build/make/tmp">
+                <sysproperty key="deploy.canonical.flag" value="true"/>
+                <sysproperty key="build.cfg" value="${build.config}"/>
+                <sysproperty key="machine.arch" value="${os.arch}"/>
+                <sysproperty key="external.dep.CLASSLIB.loc"
+                             value='${classlib.trunk}'/>
+            </exec-ant>
+        </sequential>
+    </macrodef>
 
 </project>
 

Modified: harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/parameters.xml?view=diff&rev=536061&r1=536060&r2=536061
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/parameters.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/drlvm/parameters.xml Mon May  7 22:44:45 2007
@@ -7,6 +7,11 @@
             value="${classlib.parameters.shared.trunk.dir}"/>
     </required>
 
+    <optional>
+        <build.cfg description="DRLVM Build Configuration Switch (debug/release)"
+                   value="debug"/>
+    </optional>
+
     <!-- shared values -->
     <shared>
         <!-- define the place where drlvm workspace will be placed -->
@@ -17,6 +22,8 @@
         <jre.dir value="${drlvm.parameters.shared.trunk.dir}/build/deploy/jdk/jre"/>
         <!-- the path to built DRLVM JVM -->
         <jvm.location value="${drlvm.parameters.shared.trunk.dir}/build/deploy/jdk/jre/bin/java${exe}"/>
+        <!-- DRLVM build configuration (debug/release) -->
+        <build.config value="${build.config}"/>
     </shared>
 
     <!-- CC specific configuration -->

Modified: harmony/enhanced/buildtest/branches/2.0/scripts/framework.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/framework.xml?view=diff&rev=536061&r1=536060&r2=536061
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/framework.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/framework.xml Mon May  7 22:44:45 2007
@@ -834,6 +834,42 @@
         </sequential>
     </macrodef>
 
+    <!-- Execute Ant Build in new process -->
+    <macrodef name="exec-ant">
+        <attribute name="dir" default="."/>
+        <attribute name="lib" default="${ant.home}/lib"/>
+        <attribute name="file" default="build.xml"/>
+        <attribute name="targets" default=""/>
+        <attribute name="failonerror" default="true"/>
+        <attribute name="failproperty" default="tmp.ant.exec.fail.property"/>
+        <element name="ant-params" implicit="yes" optional="yes"/>
+        <sequential>
+            <java jar="${ant.home}/lib/ant-launcher.jar"
+                  fork="true"
+                  dir="@{dir}" 
+                  failonerror="@{failonerror}"
+                  resultproperty="tmp.@{failproperty}">
+                <sysproperty key="ant.home" value="${ant.home}"/>
+                <!-- caller's specific libraries to be used with ant -->
+                <arg line='-lib "@{lib}"'/>
+                <arg line='-lib "${ext.junit.location}"'/>
+                <!-- proxy settings (if specified) -->
+                <syspropertyset>
+                    <propertyref name="http.proxyHost"/>
+                    <propertyref name="http.proxyPort"/>
+                </syspropertyset>
+                <!-- caller's build specific staff -->
+                <ant-params/>
+                <!-- targets to execute -->
+                <arg line="-f @{file} @{targets}"/>
+            </java>
+            <!-- set up failproperty in case of Ant Build failure -->
+            <condition property="@{failproperty}" value="true">
+                <not><equals arg1="${tmp.@{failproperty}}" arg2="0"/></not>
+            </condition>
+        </sequential>
+    </macrodef>
+
     <macrodef name="log">
         <attribute name="message"/>
         <sequential>