harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r550398 - in /harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm: ./ adaptor.xml parameters.xml process.xsl
Date Mon, 25 Jun 2007 07:37:23 GMT
Author: smishura
Date: Mon Jun 25 00:37:20 2007
New Revision: 550398

URL: http://svn.apache.org/viewvc?view=rev&rev=550398
Log:
Apply patch with VTSVM suite adaptor from HARMONY-3206:
([drlvm][testing] DRLVM Validation Test Suite)

Added:
    harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/
    harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/adaptor.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/parameters.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl   (with props)

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/adaptor.xml?view=auto&rev=550398
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/adaptor.xml Mon Jun 25 00:37:20
2007
@@ -0,0 +1,192 @@
+<?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 VTSVM Test Suite
+     ====================================================================== -->
+<project name="vtsvm" default="run" basedir=".">
+
+    <property name="vtsvm.make.dir" location="${test.sources.dir}/vts/vm/build"/>
+    <property name="vtsvm.dest.dir" location="${test.sources.dir}/vts/dest"/>
+
+    <!-- the file containing the summary of test execution -->
+    <property name="vtsvm.results.dir" 
+              location="${results.dir}/vtsvm"/>
+    <property name="vtsvm.results.summary.dir" 
+              location="${vtsvm.results.dir}/summary"/>
+    <property name="vtsvm.results.summary.location" 
+              location="${vtsvm.results.summary.dir}/vtsvm_results.txt"/>
+
+    <!-- do setup of VTSVM suite -->
+    <target name="setup">
+        <svn-update-bt path="${test.sources.dir}/tools"/>
+        <svn-update-bt path="${test.sources.dir}/vts"/>
+        <call-vtsvm target="setup"/>
+        <call-vtsvm target="build-vts"/>
+    </target>
+
+    <!-- do test execution -->
+    <target name="run">
+
+        <!-- remove old results (they were archived after creation) -->
+        <delete quiet="true" verbose="false">
+            <fileset dir="${vtsvm.results.dir}" includes="**/*"/>
+        </delete>
+
+        <!-- define the place where to store results -->
+        <tstamp>
+            <format property="test.run.time" pattern="yyyyMMdd_HHmm"/>
+        </tstamp>
+        <echo message="VTSVM Execution timestamp: ${test.run.time}"/>
+        <!-- prefix of the directory where th will store results -->
+        <property name="vtsvm.th.results.dir" value="vts_${test.run.time}"/>
+
+        <!-- Patch configuration of Test Harness -->
+        <!-- use XML Junit reporter -->
+        <replaceregexp 
+            file="${vtsvm.dest.dir}/VTS-built/config/cfg_env.xml"
+            match='harness\.plugins\.StoreRes"'
+            replace='harness.ReportTool.StoreResAsJU"'/>
+
+        <!-- tested.runtime is a required parameter for this adaptor -->
+        <call-vtsvm target="run-tests" 
+                    jvm="${tested.runtime}" 
+                    results="${vtsvm.th.results.dir}"/>
+
+        <mkdir dir="${vtsvm.results.dir}"/>
+        <mkdir dir="${vtsvm.results.summary.dir}"/>
+
+        <!-- convert the test results into property file -->
+        <process-results
+            results="${vtsvm.dest.dir}/${vtsvm.th.results.dir}_results/result.Other/report.xml"
+            transformer="${suite.adaptor.dir}/process.xsl"
+            output="${vtsvm.results.summary.location}"
+        />
+
+        <!-- copy JUnit XML result files to the results dir -->
+        <copy todir="${vtsvm.results.dir}">
+            <fileset dir="${vtsvm.dest.dir}/${vtsvm.th.results.dir}_results/result.Other"
+                     includes="TEST-*.xml"/>
+        </copy>
+
+        <!-- store the results in an artchive -->
+        <zip destfile="${results.dir}/vts_${test.run.time}.zip" basedir="${vtsvm.results.dir}"/>
+
+        <fail>
+            <condition>
+                <not><available file="${vtsvm.results.summary.location}"/></not>
+            </condition>...
+------
+ERROR while executing of '${suite.name}' test suite: 
+------ Could not get the test results summary file:
+       ${vtsvm.results.summary.location}
+        </fail>
+
+        <!-- process resulting property file and log the summary -->
+        <property file="${vtsvm.results.summary.location}"/>
+        <echo>
+# ${tests.date}
+
+VTSVM Run Summary:
+------------------
+Total   :  ${tests.Total}
+Passed  :  ${tests.passed}
+Failed  :  ${tests.failed}
+Error   :  ${tests.error}
+Unknown :  ${tests.unknown}
+Skipped :  ${tests.skipped}
+        </echo>
+
+        <!-- check the test results and fail if there are unexpected failures -->
+        <fail>
+            <condition>
+                <or>
+                    <not><contains string="@@${tests.failed}@@" substring="@@0@@"/></not>
+                    <not><contains string="@@${tests.error}@@" substring="@@0@@"/></not>
+                    <not><contains string="@@${tests.unknown}" substring="@@0 "/></not>
+                </or>
+            </condition>...
+--------
+FAILURE: There were VTSVM tests failures...
+--------
+        </fail>
+    </target>
+
+    <!-- cleanup the VTSVM workspace -->
+    <target name="clean">
+        <call-vtsvm target="clean"/>
+    </target>
+
+    <condition property="exe" value=".exe" else="">
+        <os family="windows"/>
+    </condition>
+
+    <!-- calls vtsvm's main build file -->
+    <macrodef name="call-vtsvm">
+        <attribute name="target"/>
+        <!-- vtsvm checks for tested jvm presence on setup and build stages,
+             so it must be already built before call to vtsvm setup and build.
+             Here, for these checks we use jvm we are working on -->
+        <attribute name="jvm" default="${java.home}/bin/java${exe}"/>
+        <!-- Prefix for directory to store results -->
+        <attribute name="results" default="vts"/>
+        <sequential>
+            <exec-ant targets="@{target}"
+                 file="${vtsvm.make.dir}/build.xml"
+                 dir="${vtsvm.make.dir}/..">
+                <jvmarg line='-XX:MaxPermSize=512m'/>
+                <arg line='-lib "${ext.xerces.impl.location}"'/>
+                <arg line='-lib "${ext.xml.apis.location}"'/>
+                <sysproperty key="tested.runtime" value="@{jvm}"/>
+                <sysproperty key="java.home.1.5" value="${jdk.1.5}"/>
+                <sysproperty key="vts.zip.prefix" value="@{results}"/>
+                <sysproperty key="jasmin.jar" value="${ext.jasmin.location}"/>
+                <sysproperty key="xerces.impl.jar" value="${ext.xerces.impl.location}"/>
+                <sysproperty key="xml.apis.jar" value="${ext.xml.apis.location}"/>
+                <sysproperty key="jasmin.jar" value="${ext.jasmin.location}"/>
+                <sysproperty key="ant-contrib.jar" value="${ext.ant-contrib.location}"/>
+                <sysproperty key="cpptasks.jar" value="${ext.cpptasks.location}"/>
+            </exec-ant>
+        </sequential>
+    </macrodef>
+
+    <!-- 
+        ========================= Support ==================================
+    -->
+
+    <!-- process the vtsvm results -->
+    <macrodef name="process-results">
+        <attribute name="results"/>
+        <attribute name="transformer"/>
+        <attribute name="output"/>
+        <sequential>
+            <xslt basedir="${suite.adaptor.dir}" 
+                  destdir="${suite.adaptor.dir}"
+                  in="@{results}" 
+                  out="@{output}" 
+                  style="@{transformer}">
+                <!-- properties can be used to specify to xslt the format 
+                     of the output -->
+                <outputproperty name="method" value="text"/>
+                <outputproperty name="encoding" value="iso8859_1"/>
+                <outputproperty name="indent" value="no"/>
+            </xslt>
+        </sequential>
+    </macrodef>
+
+</project>
+

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

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/parameters.xml?view=auto&rev=550398
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/parameters.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/parameters.xml Mon Jun 25 00:37:20
2007
@@ -0,0 +1,51 @@
+<parameters depends="classlib,drlvm">
+    <!-- required parameters -->
+    <required>
+        <!-- path to runtime to be tested, use drlvm jvm by default -->
+        <tested.runtime 
+            description="Path to Tested Runtime" 
+            value="${drlvm.parameters.shared.jvm.location}"/>
+        <!-- path to JDK 1.5, use current Java Home as a default -->
+        <jdk.1.5
+            description="Path to JDK 1.5" 
+            value="${java.home}/.."/>
+    </required>
+
+    <optional>
+    	 <usemail
+            description="Send email notifications" 
+            value="${framework.parameters.usemail}"/>
+         <usemail.to
+            description="Send to" 
+            value="${framework.parameters.usemail.to}"/>
+         <usemail.from
+            description="Send from" 
+            value="${framework.parameters.usemail.from}"/>
+    </optional>
+
+    <!-- used external libraries -->
+    <external>
+        <jasmin
+            jar="jasmin.jar"
+            url="http://heanet.dl.sourceforge.net/sourceforge/jasmin/jasmin-2.2.zip"
+            md5="c2f4a1df004983850046e1d9eaf724f3"
+        />
+        <xerces.impl
+            jar="xercesImpl.jar"
+            url="http://mirrors.ibiblio.org/pub/mirrors/maven2/xerces/xercesImpl/2.8.0/xercesImpl-2.8.0.jar"
+            md5="7eb2db331a62e74744ab79aab5b454bd"
+        />
+        <xml.apis
+            jar="xml-apis.jar"
+            url="http://mirrors.ibiblio.org/pub/mirrors/maven2/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar"
+            md5="6dee9238dd2900171197104951940778"
+        />
+        <cpptasks
+            jar="cpptasks.jar"
+            url="http://heanet.dl.sourceforge.net/sourceforge/ant-contrib/cpptasks-1.0b4.zip"
+            md5="118e601b58a48519208efa9893c7c5c0"
+        />
+    </external>
+
+    <cc results="${results.dir}/${suite.name}"/>
+</parameters>

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

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl?view=auto&rev=550398
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl Mon Jun 25 00:37:20
2007
@@ -0,0 +1,37 @@
+<?xml version='1.0'?>
+<!-- 
+
+  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.
+
+ -->
+
+<!-- 
+  This XSLT transformation is used to get the Test Run Summary 
+  from the head result.xml file. 
+  -->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+    <xsl:template match="/*">  
+        <xsl:apply-templates select="property-list"/> 
+    </xsl:template>    
+
+    <xsl:template match="property-list">
+        <xsl:for-each select="property-item">
+tests.<xsl:value-of select="./@name"/>=<xsl:value-of select="."/>
+        </xsl:for-each>
+	</xsl:template>
+
+</xsl:stylesheet>

Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/vtsvm/process.xsl
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message