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/04/24 09:28:04 UTC
svn commit: r531800 - in
/harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo: ./ adaptor.xml
parameters.xml publisher.xml readme.txt
Author: smishura
Date: Tue Apr 24 00:28:03 2007
New Revision: 531800
URL: http://svn.apache.org/viewvc?view=rev&rev=531800
Log:
Apply patch from HARMONY-3681:
([testing] Dacapo benchmark integration to the buildtest infrastructure)
Added:
harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/
harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml (with props)
harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml (with props)
harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml (with props)
harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt (with props)
Added: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml?view=auto&rev=531800
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml Tue Apr 24 00:28:03 2007
@@ -0,0 +1,94 @@
+<?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. -->
+
+<project name="dacapo" default="run" basedir=".">
+
+ <property name="work.dir" location="${results.dir}/${suite.name}"/>
+ <property name="output.log" value="${work.dir}/${suite.name}_output.txt"/>
+
+ <target name="setup">
+ <description>${suite.name} setup</description>
+ <mkdir dir="${work.dir}"/>
+ <mkdir dir="${checkouts.dir}/${suite.name}"/>
+
+ <!-- download dacapo if needed-->
+ <available property="doesnt.need.download" file="${checkouts.dir}/${suite.name}/${dacapo.parameters.optional.jar.name}"/>
+ <antcall target="-dacapo.download"/>
+ </target>
+
+ <target name="-dacapo.download" unless="doesnt.need.download">
+ <get src="${dacapo.parameters.optional.download.address}/${dacapo.parameters.optional.jar.name}"
+ dest="${checkouts.dir}/${suite.name}" usetimestamp="false" verbose="true"/>
+ </target>
+
+ <target name="run">
+ <description>${suite.name} run</description>
+
+ <echo file="${output.log}" message="Running of ${dacapo.parameters.optional.jar.name} on ${dacapo.jdk.to.test.home} runtime...${line.separator}"/>
+ <echo file="${output.log}" message="Set of tests: ${dacapo.parameters.optional.benchmarks}${line.separator}" append="true"/>
+
+ <exec executable="${dacapo.jdk.to.test.home}/bin/java" dir="${results.dir}/${suite.name}" append="true" failonerror="false">
+ <arg line="-jar ${checkouts.dir}/${suite.name}/${dacapo.parameters.optional.jar.name}"/>
+ <arg line="-s ${dacapo.parameters.optional.size}"/>
+ <arg line="${dacapo.parameters.optional.benchmarks}"/>
+ <redirector alwaysLog="true" output="${output.log}"/>
+ </exec>
+
+ <!-- count "number" of requested workloads -->
+ <echo file="${work.dir}/dacapo_tests.tmp">${dacapo.parameters.optional.benchmarks}</echo>
+ <loadfile srcFile="${work.dir}/dacapo_tests.tmp" property="number.of.tests" failonerror="false">
+ <filterchain>
+ <tokenfilter>
+ <replaceregex pattern="\s*\w+\s*" replace="." flags="g"/>
+ </tokenfilter>
+ </filterchain>
+ </loadfile>
+
+ <!-- count "number" of executed workloads -->
+ <copy file="${output.log}" tofile="${work.dir}/dacapo_runned_tests.tmp" overwrite="true" failonerror="false">
+ <filterchain>
+ <linecontainsregexp>
+ <regexp pattern="^===== DaCapo \w+ PASSED in \d+ msec =====.*"/>
+ </linecontainsregexp>
+ <tokenfilter>
+ <replaceregex pattern="^.*$" replace="." flags="mg"/>
+ </tokenfilter>
+ </filterchain>
+ </copy>
+ <replaceregexp file="${work.dir}/dacapo_runned_tests.tmp" match="\r|\n" replace="" flags="sg"/>
+ <loadfile srcFile="${work.dir}/dacapo_runned_tests.tmp" property="number.of.runned.tests" failonerror="false"/>
+
+ <echo>Number of tests: (${number.of.tests})</echo>
+ <echo>N of runned tests(${number.of.runned.tests})</echo>
+
+ <fail message="Not all workloads completed successfully">
+ <condition>
+ <not>
+ <equals arg1="${number.of.tests}" arg2="${number.of.runned.tests}"/>
+ </not>
+ </condition>
+ </fail>
+
+ </target>
+
+ <target name="clean">
+ <description>${suite.name} clean</description>
+ <echo>${suite.name} clean does nothing.</echo>
+ </target>
+
+</project>
+
Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/adaptor.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml?view=auto&rev=531800
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml Tue Apr 24 00:28:03 2007
@@ -0,0 +1,26 @@
+<parameters>
+
+ <required>
+ <jdk.to.test.home description="Home of the Java runtime to run Dacapo on"
+ value="${drlvm.parameters.shared.jre.dir}"/>
+ </required>
+
+ <optional>
+ <always.mail description="Always send mail notification or only to identify status change"
+ value="true"/>
+ <benchmarks description="Set of benchmarks to run"
+ value="antlr bloat chart eclipse fop hsqldb lusearch luindex pmd xalan jython"/>
+ <size description="Specifies the workload size, can be 'small', 'default' or 'large'"
+ value="small"/>
+ <download.address description="URL where to get Dacapo jar from"
+ value="http://switch.dl.sourceforge.net/sourceforge/dacapobench"/>
+ <jar.name description="Exact name of the Dacapo jar file itself"
+ value="dacapo-2006-10-MR2.jar"/>
+ </optional>
+
+ <cc>
+ <publisher value="${adaptors.dir}/${suite.name}/publisher.xml"/>
+ </cc>
+
+</parameters>
+
Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/parameters.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml?view=auto&rev=531800
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml Tue Apr 24 00:28:03 2007
@@ -0,0 +1,78 @@
+<!--
+ 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.
+-->
+<project name="publish.results" default="publish" basedir=".">
+
+<!-- start of common section for SPECs -->
+ <condition property="subject"
+ value="${suite.name} PASSED on ${os.name} ${os.arch}"
+ else="${suite.name} FAILED on ${os.name} ${os.arch}">
+ <istrue value="${thisbuildsuccessful}"/>
+ </condition>
+
+ <condition property="is.passed">
+ <istrue value="${thisbuildsuccessful}"/>
+ </condition>
+
+ <property name="output.log" value="${results.dir}/${suite.name}/${suite.name}_output.txt"/>
+ <property name="output.log.processed" value="${output.log}.processed"/>
+
+ <condition property="need.to.send">
+ <and>
+ <or>
+ <equals arg1="${dacapo.parameters.optional.always.mail}" arg2="true"/>
+ <not>
+ <equals arg1="${thisbuildsuccessful}" arg2="${lastbuildsuccessful}"/>
+ </not>
+ </or>
+ <isset property="framework.parameters.usemail"/>
+ <isset property="framework.parameters.usemail.to"/>
+ <isset property="framework.parameters.usemail.from"/>
+ </and>
+ </condition>
+<!-- end of common section for SPECs -->
+
+ <target name="-process.log.passed" if="is.passed">
+ <copy file="${output.log}" tofile="${output.log.processed}" overwrite="true">
+ <filterchain>
+ <linecontainsregexp>
+ <regexp pattern="(^Running of .* runtime\.\.\..*)|(^Set of tests: .*)|(^===== DaCapo \w+ PASSED in \d+ msec =====.*)|(^===== DaCapo \w+ starting =====.*)"/>
+ </linecontainsregexp>
+ <prefixlines prefix="${line.separator}"/>
+ </filterchain>
+ </copy>
+ </target>
+
+ <target name="-process.log.failed" unless="is.passed">
+ <!-- let's publish the whole log if the test failed -->
+ <copy file="${output.log}" tofile="${output.log.processed}" overwrite="true">
+ </copy>
+ </target>
+
+ <target name="publish" if="need.to.send" depends="-process.log.passed, -process.log.failed">
+ <echo>Sending report: ${output.log.processed}</echo>
+ <mail from="${framework.parameters.usemail.from}"
+ tolist="${framework.parameters.usemail.to}"
+ messagefile="${output.log.processed}"
+ failonerror="true"
+ mailhost="${framework.parameters.usemail}"
+ subject="${subject}"
+ encoding="plain">
+ </mail>
+ </target>
+
+</project>
+
Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/publisher.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt?view=auto&rev=531800
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt Tue Apr 24 00:28:03 2007
@@ -0,0 +1,27 @@
+This file describes implemetation of a runner of Dacapo benchmark which uses
+Build & Test Infrastructure 2.0 (HARMONY-3501).
+
+This readme assumes that the reader is already familiar with BT 2.0 concepts.
+
+The Dacapo benchmark will be downloaded by the runner at 'setup' stage from
+the location specified by two optional parameters: 'download.address' and
+'jar.name'. By default they are pointing to sourceforge site. If, by any
+change, you already have the Dacapo jar, and would like to skip the downloading
+step, you can simply put tjhe jar to 'build/checkouts/dacapo' directory.
+
+Another optional parameters are:
+1) 'benchmarks' - specifying a set of benchmarks to run. By default the list
+ contains all available benchmarks.
+2) 'size' - Specifies the workload size, can be 'small', 'default' or 'large'.
+ By default it's 'small'
+3) 'always.mail' - when set to 'true', notifications are being sent after each
+ run; when 'false', only changes between passed/failed state are reported.
+
+The benchmark run is considered to be PASSED, if a number of PASSED workloads
+is equal to the number of workloads specified by 'benchmarks' parameter and to
+be FAILED otherwise.
+
+The notification contains finishing lines of each workload's log in case of
+normal execution of the benchmark, and the whole log if the run was considered
+FAILED.
+
Propchange: harmony/enhanced/buildtest/branches/2.0/adaptors/dacapo/readme.txt
------------------------------------------------------------------------------
svn:eol-style = native