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 2008/05/20 12:35:49 UTC

svn commit: r658194 - in /harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008: ./ adaptor.xml parameters.xml readme.txt

Author: smishura
Date: Tue May 20 03:35:49 2008
New Revision: 658194

URL: http://svn.apache.org/viewvc?rev=658194&view=rev
Log:
Apply patch from HARMONY-5830:
[testing] SPECjvm2008 runner for the buildtest infrastructure

Added:
    harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/
    harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/adaptor.xml   (with props)
    harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml   (with props)
    harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt   (with props)

Added: harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/adaptor.xml?rev=658194&view=auto
==============================================================================
--- harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/adaptor.xml (added)
+++ harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/adaptor.xml Tue May 20 03:35:49 2008
@@ -0,0 +1,89 @@
+<?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="specjvm2008" 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}"/>
+    </target>
+
+    <target name="run">
+        <description>${suite.name} run</description>
+
+        <echo file="${output.log}" message="Running of ${specjvm2008.spec.home} on ${specjvm2008.jdk.to.test.home} runtime...${line.separator}"/>
+        <echo file="${output.log}" message="Set of tests: ${specjvm2008.parameters.optional.tests}${line.separator}" append="true"/>
+
+        <exec executable="${specjvm2008.jdk.to.test.home}/bin/java" dir="${specjvm2008.spec.home}" append="true" failonerror="false">
+            <arg line="${specjvm2008.parameters.optional.tested.vm.options}"/>
+            <arg line="-jar SPECjvm2008.jar"/>
+            <arg line="-ikv"/>
+            <arg line="${specjvm2008.parameters.optional.tests}"/>
+            <redirector alwaysLog="true" output="${output.log}"/>
+        </exec>
+
+        <!-- count "number" of requested workloads -->
+        <echo file="${work.dir}/specjvm2008_tests.tmp">${specjvm2008.parameters.optional.tests}</echo>
+        <loadfile srcFile="${work.dir}/specjvm2008_tests.tmp" property="number.of.tests" failonerror="false">
+            <filterchain>
+                <tokenfilter>
+                    <replaceregex pattern="\s*[\w\.]+\s*" replace="." flags="g"/>
+                </tokenfilter>
+            </filterchain>
+        </loadfile>
+
+        <!-- previously unset number.of.tests means the whole suite
+             run, so we set 38 dots --> 
+        <property name="number.of.tests"
+                  value="......................................" />
+
+        <!-- count "number" of executed workloads -->        
+        <copy file="${output.log}" tofile="${work.dir}/specjvm2008_runned_tests.tmp" overwrite="true" failonerror="false">
+            <filterchain>
+                <linecontainsregexp>
+                    <regexp pattern="Score on [\w\.]+:\s+[\d\.]+\s+ops/m"/>
+                </linecontainsregexp>
+                <tokenfilter>
+                    <replaceregex pattern="^.*$" replace="." flags="mg"/>
+                </tokenfilter>
+            </filterchain>
+        </copy>
+        <replaceregexp file="${work.dir}/specjvm2008_runned_tests.tmp" match="\r|\n" replace="" flags="sg"/>
+        <loadfile srcFile="${work.dir}/specjvm2008_runned_tests.tmp" property="number.of.runned.tests" failonerror="false"/>
+
+        <echo>Requested tests: (${number.of.tests})</echo>
+        <echo>Executed 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/trunk/infra/adaptors/specjvm2008/adaptor.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml?rev=658194&view=auto
==============================================================================
--- harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml (added)
+++ harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml Tue May 20 03:35:49 2008
@@ -0,0 +1,45 @@
+<?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. 
+-->
+
+<parameters depends="drlvm">
+
+    <required>
+        <jdk.to.test.home description="Home of the Java runtime to run SPECjvm2008 on" 
+                     value="${drlvm.parameters.shared.jre.dir}"/>
+        <spec.home description="Location of the SPECjvm2008" 
+                     value=""/>
+    </required>    
+
+    <optional>
+        <always.mail description="Always send mail notification or only to identify status change" 
+                     value="false"/>
+<!--
+        <tests description="Set of SPECjvm2008 tests to run" 
+                     value="startup.helloworld startup.compiler.compiler startup.compiler.sunflow startup.compress startup.crypto.aes startup.crypto.rsa startup.crypto.signverify startup.mpegaudio startup.scimark.fft startup.scimark.lu startup.scimark.monte_carlo startup.scimark.sor startup.scimark.sparse startup.serial startup.sunflow startup.xml.transform startup.xml.validation compiler.compiler compiler.sunflow compress crypto.aes crypto.rsa crypto.signverify derby mpegaudio scimark.fft.large scimark.fft.small scimark.lu.large scimark.lu.small scimark.monte_carlo scimark.sor.large scimark.sor.small scimark.sparse.large scimark.sparse.small serial sunflow xml.transform xml.validation"/>
+-->
+        <tests description="Set of SPECjvm2008 tests to run" 
+                     value=""/>
+
+        <tested.vm.options description="JVM options for tested runtime" 
+                     value="-Xem:server -Xms512m -Xmx512m"/>
+
+    </optional>
+    
+    <cc summary="${output.log}"/>
+</parameters>
+

Propchange: harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/parameters.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt?rev=658194&view=auto
==============================================================================
--- harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt (added)
+++ harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt Tue May 20 03:35:49 2008
@@ -0,0 +1,26 @@
+This file describes implemetation of a runner of SPECjvm2008 benchmark which 
+uses Build & Test Infrastructure 2.0 (HARMONY-3501).
+
+This readme assumes that the reader is already familiar with BT 2.0 concepts.
+
+It is assumed also that the one who wants to run SPECjvm2008 has the SPEC
+itself installed somewhere. The path to the SPEC location should be provided
+as a value to the parameter 'specjvm2008.required.parameter.spec.home'.
+Customization of SPEC execution is performed through editing of an
+_optional_ property named 'specjvm2008.tests' containing names of
+tests to execute. The property contains no tests by default which
+means the whole test suite execution. File parameters.xml also contains
+commented tag <tests> with list of all the 38 tests names for the future
+execution parametrizing.
+
+There are two notification options available - if an optional parameter 
+'always.mail' is set to 'true', notifications are being sent after each run;
+if the parameter is set to 'false', only changes between passed/failed
+state are reported.
+
+The SPEC is considered to be PASSED, if number of measured workloads is equal
+to the number of specified workloads and to be FAILED otherwise.
+
+The notification contains finishing lines of each workload's log in case of
+normal execution of the SPEC, and the whole log if the SPEC was considered 
+FAILED.

Propchange: harmony/enhanced/buildtest/trunk/infra/adaptors/specjvm2008/readme.txt
------------------------------------------------------------------------------
    svn:eol-style = native