You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2007/08/29 14:41:59 UTC
svn commit: r570786 - in /harmony/enhanced/buildtest/branches/2.0/scripts:
cc-exec-adaptor.xml parameters.xml properties.xml publisher.xml
xslt/status.xsl
Author: varlax
Date: Wed Aug 29 05:41:58 2007
New Revision: 570786
URL: http://svn.apache.org/viewvc?rev=570786&view=rev
Log:
Added draft feature of results uploading
Added:
harmony/enhanced/buildtest/branches/2.0/scripts/properties.xml
harmony/enhanced/buildtest/branches/2.0/scripts/xslt/status.xsl
Modified:
harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml
harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml
Modified: harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml?rev=570786&r1=570785&r2=570786&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/cc-exec-adaptor.xml Wed Aug 29 05:41:58 2007
@@ -20,6 +20,8 @@
====================================================================== -->
<project name="cc-ant" default="cc-publish" basedir=".">
+ <import file="properties.xml"/>
+
<property file="${properties.dump.file}"/>
<property file="${framework.properties.file}"/>
<import file="${framework.implementation.file}"/>
@@ -194,6 +196,11 @@
</propertyset>
</ant>
+ <condition property="upload.dir" value="${framework.parameters.optional.upload.dir}">
+ <isset property="framework.parameters.optional.upload.dir"/>
+ </condition>
+ <runtarget target="upload-status-report"/>
+
</target>
<target name="-store-cc-logs" if="cc.execution.log.file.available">
@@ -223,6 +230,39 @@
style="${scripts.dir}/xslt/br.xsl"
out="${cc.message.file}"
classpath="${ext.xalan.location}:${ext.cc.location}/lib/serializer-2.7.0.jar"/>
+ </target>
+
+ <target name="upload-status-report" if="upload.dir">
+ <property name="cc.xsl.files.dir"
+ value="${ext.cc.location}/webapps/cruisecontrol/xsl"/>
+ <property name="status.report.dir"
+ value="${results.dir}/${hy.platform}/${suite.name}"/>
+ <property name="status.report.index"
+ value="${status.report.dir}/index.html"/>
+
+ <delete dir="${status.report.dir}" quiet="true"/>
+ <mkdir dir="${status.report.dir}"/>
+
+ <copy file="${scripts.dir}/xslt/status.xsl" todir="${cc.xsl.files.dir}"/>
+ <xslt in="${logdir}/${logfile}"
+ style="${cc.xsl.files.dir}/status.xsl"
+ out="${status.report.index}"
+ classpath="${ext.xalan.location}:${ext.cc.location}/lib/serializer-2.7.0.jar">
+ <param name="title" expression="Status of ${suite.name} on ${hy.platform}"/>
+ </xslt>
+
+ <copy file="${cc.execution.log.file}" todir="${status.report.dir}"/>
+
+ <condition property="build.status" value="passed" else="failed">
+ <!-- the property is passed by CC -->
+ <equals arg1="${thisbuildsuccessful}" arg2="true" />
+ </condition>
+ <echo file="${status.report.dir}/status.txt" message="${build.status}" />
+
+ <zip destfile="${upload.dir}/${hy.platform}.${suite.name}.status.zip"
+ basedir="${results.dir}"
+ includes="${hy.platform}/${suite.name}/**"
+ update="true" />
</target>
</project>
Modified: harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml?rev=570786&r1=570785&r2=570786&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/parameters.xml Wed Aug 29 05:41:58 2007
@@ -4,6 +4,7 @@
<!-- optional framework preferences -->
<optional>
<dolog value="false" description="Do you want to see Framework execution log?"/>
+ <upload.dir description="A directory to upload status reports to"/>
</optional>
<repository>
Added: harmony/enhanced/buildtest/branches/2.0/scripts/properties.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/properties.xml?rev=570786&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/properties.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/properties.xml Wed Aug 29 05:41:58 2007
@@ -0,0 +1,157 @@
+<?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="Top-Level property definitions">
+ <description>
+ Ant file of common properties to be imported by other ant files
+ </description>
+
+ <!-- Conditions for operating systems -->
+ <condition property="is.windows">
+ <os family="Windows" />
+ </condition>
+ <condition property="is.linux">
+ <os name="linux" />
+ </condition>
+ <condition property="is.macosx">
+ <os name="mac os x" />
+ </condition>
+ <condition property="is.freebsd">
+ <os name="freebsd" />
+ </condition>
+ <condition property="is.aix">
+ <os name="aix" />
+ </condition>
+ <condition property="is.unix">
+ <os family="unix" />
+ </condition>
+ <condition property="is.zos">
+ <os name="z/OS" />
+ </condition>
+
+ <!-- Normalized operating system family -->
+ <condition property="hy.os.family" value="windows">
+ <isset property="is.windows" />
+ </condition>
+ <property name="hy.os.family" value="unix" />
+
+ <!-- Normalized operating system name -->
+
+ <!-- this special case makes sense -->
+ <condition property="hy.os" value="windows">
+ <isset property="is.windows"/>
+ </condition>
+ <condition property="hy.os" value="linux">
+ <os name="linux" />
+ </condition>
+ <condition property="hy.os" value="freebsd">
+ <os name="freebsd" />
+ </condition>
+ <condition property="hy.os" value="macosx">
+ <isset property="is.macosx"/>
+ </condition>
+ <condition property="hy.os" value="aix">
+ <os name="aix" />
+ </condition>
+ <condition property="hy.os" value="zos">
+ <isset property="is.zos"/>
+ </condition>
+
+ <property name="hy.os" value="${os.name}" />
+
+
+
+ <!-- Conditions for different architectures -->
+ <condition property="is.x86_64">
+ <or>
+ <equals arg1="x86_64" arg2="${os.arch}"/>
+ <equals arg1="amd64" arg2="${os.arch}"/>
+ </or>
+ </condition>
+ <condition property="is.x86">
+ <and>
+ <not>
+ <isset property="is.x86_64" />
+ </not>
+ <or>
+ <equals arg1="x86" arg2="${os.arch}"/>
+ <equals arg1="i386" arg2="${os.arch}"/>
+ </or>
+ </and>
+ </condition>
+ <condition property="is.ia64">
+ <equals arg1="ia64" arg2="${os.arch}"/>
+ </condition>
+ <condition property="is.ppc32">
+ <or>
+ <equals arg1="${os.arch}" arg2="ppc32" />
+ <equals arg1="${os.arch}" arg2="ppc" />
+ </or>
+ </condition>
+ <condition property="is.ppc64">
+ <equals arg1="${os.arch}" arg2="ppc64" />
+ </condition>
+ <condition property="is.s390x">
+ <equals arg1="${os.arch}" arg2="s390x" />
+ </condition>
+ <condition property="is.s390">
+ <equals arg1="${os.arch}" arg2="s390" />
+ </condition>
+
+ <condition property="is.64bit">
+ <or>
+ <isset property="is.ia64" />
+ <isset property="is.x86_64" />
+ <isset property="is.ppc64" />
+ <isset property="is.s390x" />
+ </or>
+ </condition>
+ <condition property="is.32bit">
+ <or>
+ <isset property="is.x86" />
+ <isset property="is.ppc32" />
+ <isset property="is.s390" /> <!-- 31bit of course -->
+ </or>
+ </condition>
+ <condition property="hy.bits" value="32" else="64">
+ <isset property="is.32bit" />
+ </condition>
+
+ <!-- Normalized architecture name -->
+ <condition property="hy.arch" value="x86_64">
+ <isset property="is.x86_64" />
+ </condition>
+ <condition property="hy.arch" value="x86">
+ <and>
+ <isset property="is.x86" />
+ <isset property="is.32bit" />
+ </and>
+ </condition>
+ <condition property="hy.arch" value="ppc32">
+ <isset property="is.ppc32" />
+ </condition>
+ <property name="hy.arch" value="${os.arch}" />
+
+ <!-- Normalized platform name -->
+ <property name="hy.platform" value="${hy.os}_${hy.arch}"/>
+
+
+</project>
\ No newline at end of file
Modified: harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml?rev=570786&r1=570785&r2=570786&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/publisher.xml Wed Aug 29 05:41:58 2007
@@ -47,25 +47,12 @@
</condition>
<!-- architecture name -->
- <condition property="mail.os.arch" value="x86">
- <or>
- <os arch="x86"/>
- <os arch="i386"/>
- </or>
- </condition>
- <condition property="mail.os.arch" value="x86_64">
- <or>
- <os arch="x86_64"/>
- <os arch="amd64"/>
- <os arch="em64t"/>
- </or>
- </condition>
- <property name="mail.os.arch" value="${os.arch}"/>
+ <import file="properties.xml"/>
<!-- compose subject line -->
<property name="mail.subject.suffix" value=""/>
<property name="mail.subject.line"
- value="${mail.subject.prefix} ${mail.execution.status} ${os.name} ${mail.os.arch}: ${suite.name} ${mail.subject.suffix}"/>
+ value="${mail.subject.prefix} ${mail.execution.status} ${os.name} ${hy.arch}: ${suite.name} ${mail.subject.suffix}"/>
<!-- implement publisher interface -->
<target name="publish" if="do.mail">
Added: harmony/enhanced/buildtest/branches/2.0/scripts/xslt/status.xsl
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/scripts/xslt/status.xsl?rev=570786&view=auto
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/scripts/xslt/status.xsl (added)
+++ harmony/enhanced/buildtest/branches/2.0/scripts/xslt/status.xsl Wed Aug 29 05:41:58 2007
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--********************************************************************************
+ * CruiseControl, a Continuous Integration Toolkit
+ * Copyright (c) 2001, ThoughtWorks, Inc.
+ * 651 W Washington Ave. Suite 500
+ * Chicago, IL 60661 USA
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * + Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * + Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ *
+ * + Neither the name of ThoughtWorks, Inc., CruiseControl, nor the
+ * names of its contributors may be used to endorse or promote
+ * products derived from this software without specific prior
+ * written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ********************************************************************************-->
+<!--
+ 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.
+-->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:import href="header.xsl"/>
+ <xsl:import href="buildresults.xsl"/>
+
+ <xsl:output method="html"/>
+
+ <xsl:variable name="cruisecontrol.list" select="."/>
+ <xsl:param name="title" />
+
+
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title><xsl:value-of select="$title" /> </title>
+ </head>
+ <body>
+ <p><h1 align="center"><xsl:value-of select="$title" /> </h1></p>
+ <p><xsl:apply-templates select="$cruisecontrol.list" mode="header"/></p>
+ <p><a href="execution_log.html">Execution log</a></p>
+ <p><xsl:apply-templates select="$cruisecontrol.list" mode="errors"/></p>
+ <p><xsl:apply-templates select="$cruisecontrol.list" mode="unittests"/></p>
+ <!--p><xsl:apply-templates select="$cruisecontrol.list" mode="modifications"/></p-->
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>