harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r540850 - in /harmony/enhanced/buildtest/branches/2.0: adaptors/tomcat-scenario/ adaptors/tomcat-scenario/adaptor.xml adaptors/tomcat-scenario/parameters.xml tests/tomcat-scenario/ tests/tomcat-scenario/index.g tests/tomcat-scenario/jsp_ex.g
Date Wed, 23 May 2007 06:08:03 GMT
Author: smishura
Date: Tue May 22 23:08:02 2007
New Revision: 540850

URL: http://svn.apache.org/viewvc?view=rev&rev=540850
Log:
Apply patch from HARMONY-3827:
([testing][bt20] project to run simple scenario for tomcat under CC/CI)

Note: for 'golden' pages index.g and jsp_ex.g eol-style=CRLF

Added:
    harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/
    harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/adaptor.xml   (with props)
    harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/parameters.xml   (with
props)
    harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/
    harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g   (with props)
    harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g   (with props)

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/adaptor.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/adaptor.xml?view=auto&rev=540850
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/adaptor.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/adaptor.xml Tue May 22
23:08:02 2007
@@ -0,0 +1,156 @@
+<?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 Tomcat simple scenario
+     ====================================================================== -->
+<project name="tomcat-scenario" default="run" basedir=".">
+
+    <property name="tomcat.results.dir" location="${results.dir}/${suite.name}"/>
+    <property name="tomcat.src.dir" location="${test.sources.dir}/${suite.name}"/>
+    <property environment="env"/>
+
+    <condition property="shell" value="cmd" else="sh">
+        <os family="windows"/>
+    </condition>
+
+    <condition property="start.script" value="/C startup.bat" else="startup.sh">
+        <os family="windows"/>
+    </condition>
+
+    <condition property="stop.script" value="/C shutdown.bat" else="shutdown.sh">
+        <os family="windows"/>
+    </condition>
+
+    <!-- data urls -->
+    <property name="index.location"
+              value="http://localhost:${tomcat-scenario.parameters.optional.port.number}/index.jsp"/>
+    <property name="jsp.ex"
+              value="http://localhost:${tomcat-scenario.parameters.optional.port.number}/examples/jsp/jsp2/el/basic-comparisons.jsp"/>
+
+    <!-- Setup of the Tomcat scenario -->
+    <target name="setup">
+
+        <!--
+            Setup port number for Tomcat server
+        -->
+        <replaceregexp file="${ext.tomcat.location}/conf/server.xml"
+                       match="port=\&quot;.*\&quot; protocol=\&quot;HTTP(.*)\&quot;"
+                       replace="port=\&quot;${tomcat-scenario.parameters.optional.port.number}\&quot;
protocol=\&quot;HTTP\1\&quot;"
+                       flags="g" byline="true"/>
+        <!--
+            Create results directory
+        -->
+        <mkdir dir="${tomcat.results.dir}"/>
+
+        <!--
+            Make Tomcat startup scripts executable
+        -->
+        <chmod perm="a+x">
+            <fileset dir="${ext.tomcat.location}/bin" includes="*.sh"/>
+        </chmod>
+
+    </target>
+    
+    <target name="run" depends="clean">
+
+        <parallel>
+            <sequential>
+
+                <!--
+                    Starting Tomcat server
+                -->
+                <exec executable="${shell}"
+                      dir="${ext.tomcat.location}/bin"
+                      spawn="true">
+                    <arg line="${start.script}"/>
+                    <env key="JRE_HOME" path="${tested.runtime}"/>
+                    <env key="JAVA_OPTS" value="${tomcat-scenario.parameters.optional.tested.vm.options}"/>
+                    <env key="PATH" path="${tested.runtime}${file.separator}bin${path.separator}${env.PATH}"/>
+                </exec>
+
+            </sequential>
+            <sequential>
+
+                <!--
+                    Wait for Tomcat server started
+                -->
+                <waitfor maxwait="300" maxwaitunit="second" timeoutproperty="failed.timeout">
+                    <length when="greater" length="0">
+                        <fileset dir="${ext.tomcat.location}/logs">
+                            <filename name="catalina*.log"/>
+                            <contains text="INFO: Server startup in"/>
+                        </fileset>
+                    </length>
+                </waitfor>
+                <fail message="Tomcat server startup timeout exceeded" if="failed.timeout"/>
+
+                <!--
+                    Get data from started server
+                -->
+                <get src="${index.location}"
+                     dest="${tomcat.results.dir}/index.htm"
+                     usetimestamp="true"
+                     verbose="true"/>
+                <get src="${jsp.ex}"
+                     dest="${tomcat.results.dir}/jsp_ex.htm"
+                     usetimestamp="true"
+                     verbose="true"/>
+
+                <!--
+                    Stop Tomcat server
+                -->
+                <exec executable="${shell}"
+                      dir="${ext.tomcat.location}/bin">
+                    <arg line="${stop.script}"/>
+                    <env key="JRE_HOME" path="${tested.runtime}"/>
+                    <env key="JAVA_OPTS" value="${tomcat-scenario.parameters.optional.tested.vm.options}"/>
+                    <env key="PATH" path="${tested.runtime}${file.separator}bin${path.separator}${env.PATH}"/>
+                </exec>
+            </sequential>
+        </parallel>
+
+        <!--
+            Check the data is valid
+        -->
+        <condition property="passed">
+            <and>
+                <filesmatch file1="${tomcat.results.dir}/index.htm" file2="${tomcat.src.dir}/index.g"/>
+                <filesmatch file1="${tomcat.results.dir}/jsp_ex.htm" file2="${tomcat.src.dir}/jsp_ex.g"/>
+            </and>
+        </condition>
+
+        <fail message="Tomcat scenario failed: data retrieved from server is not valid."
unless="passed"/>
+
+    </target>
+
+    <target name="clean">
+        <!--
+            Removing results of previous build
+        -->
+        <delete file="${tomcat.results.dir}/index.htm" failonerror="false"/>
+        <delete file="${tomcat.results.dir}/jsp_ex.htm" failonerror="false"/>
+
+        <!--
+            Removing logs of previous Tomcat run
+        -->
+        <delete failonerror="false">
+            <fileset dir="${ext.tomcat.location}/logs" includes="*.log"/>
+        </delete>
+    </target>
+
+</project>

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

Added: harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/parameters.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/parameters.xml?view=auto&rev=540850
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/parameters.xml (added)
+++ harmony/enhanced/buildtest/branches/2.0/adaptors/tomcat-scenario/parameters.xml Tue May
22 23:08:02 2007
@@ -0,0 +1,50 @@
+<?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>
+        <tested.runtime
+            description="Path to Tested Runtime"
+            value="${drlvm.parameters.shared.jre.dir}"/>
+    </required>
+    
+    <optional>
+        <tested.vm.options
+            description="JVM options for tested runtime" 
+            value=""/>
+        <port.number
+            description="Port to run the Tomcat"
+            value="8091"/>
+    </optional>
+
+    <external>
+        <tomcat
+            description="Location of Tomcat binaries" 
+            url="http://www.apache.org/dist/tomcat/tomcat-6/v6.0.10/bin/apache-tomcat-6.0.10.zip"
+            md5="145ea3ac0053d599c2a3601c12e6eca2"
+            dir="apache-tomcat-6.0.10"/>
+    </external>
+    
+    <shared/> 
+    
+    <cc>
+        <!-- There are no special CC parameters for this suite -->
+    </cc>
+
+</parameters>

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

Added: harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g?view=auto&rev=540850
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g Tue May 22 23:08:02
2007
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+    <head>
+    <title>Apache Tomcat/6.0.10</title>
+    <style type="text/css">
+    /*<![CDATA[*/
+      body {
+          color: #000000;
+          background-color: #FFFFFF;
+	  font-family: Arial, "Times New Roman", Times, serif;
+          margin: 10px 0px;
+      }
+
+    img {
+       border: none;
+    }
+    
+    a:link, a:visited {
+        color: blue
+    }
+
+    th {
+        font-family: Verdana, "Times New Roman", Times, serif;
+        font-size: 110%;
+        font-weight: normal;
+        font-style: italic;
+        background: #D2A41C;
+        text-align: left;
+    }
+
+    td {
+        color: #000000;
+	font-family: Arial, Helvetica, sans-serif;
+    }
+    
+    td.menu {
+        background: #FFDC75;
+    }
+
+    .center {
+        text-align: center;
+    }
+
+    .code {
+        color: #000000;
+        font-family: "Courier New", Courier, monospace;
+        font-size: 110%;
+        margin-left: 2.5em;
+    }
+    
+     #banner {
+        margin-bottom: 12px;
+     }
+
+     p#congrats {
+         margin-top: 0;
+         font-weight: bold;
+         text-align: center;
+     }
+
+     p#footer {
+         text-align: right;
+         font-size: 80%;
+     }
+     /*]]>*/
+   </style>
+</head>
+
+<body>
+
+<!-- Header -->
+<table id="banner" width="100%">
+    <tr>
+      <td align="left" style="width:130px">
+        <a href="http://tomcat.apache.org/">
+	  <img src="tomcat.gif" height="92" width="130" alt="The Mighty Tomcat - MEOW!"/>
+	</a>
+      </td>
+      <td align="left" valign="top"><b>Apache Tomcat/6.0.10</b></td>
+      <td align="right">
+        <a href="http://jakarta.apache.org/">
+	  <img src="asf-logo-wide.gif" height="51" width="537" alt="The Apache Software Foundation"/>
+	</a>
+       </td>
+     </tr>
+</table>
+
+<table>
+    <tr>
+
+        <!-- Table of Contents -->
+        <td valign="top">
+            <table width="100%" border="1" cellspacing="0" cellpadding="3">
+                <tr>
+		  <th>Administration</th>
+                </tr>
+                <tr>
+		  <td class="menu">
+		    <a href="manager/status">Status</a><br/>
+                    <!--<a href="admin">Tomcat&nbsp;Administration</a><br/>-->
+                    <a href="manager/html">Tomcat&nbsp;Manager</a><br/>
+                    &nbsp;
+                  </td>
+                </tr>
+            </table>
+
+	    <br />
+            <table width="100%" border="1" cellspacing="0" cellpadding="3">
+                <tr>
+		  <th>Documentation</th>
+                </tr>
+                <tr>
+                  <td class="menu">
+                    <a href="RELEASE-NOTES.txt">Release&nbsp;Notes</a><br/>
+                    <a href="docs/changelog.html">Change&nbsp;Log</a><br/>
+                    <a href="docs">Tomcat&nbsp;Documentation</a><br/>
                       &nbsp;
+                    &nbsp;
+		    </td>
+                </tr>
+            </table>
+	    
+            <br/>
+            <table width="100%" border="1" cellspacing="0" cellpadding="3">
+                <tr>
+                  <th>Tomcat Online</th>
+                </tr>
+                <tr>
+                  <td class="menu">
+                    <a href="http://tomcat.apache.org/">Home&nbsp;Page</a><br/>
+		    <a href="http://tomcat.apache.org/faq/">FAQ</a><br/>
+                    <a href="http://tomcat.apache.org/bugreport.html">Bug&nbsp;Database</a><br/>
+                    <a href="http://issues.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=RESOLVED&amp;resolution=LATER&amp;resolution=REMIND&amp;resolution=---&amp;bugidtype=include&amp;product=Tomcat+5&amp;cmdtype=doit&amp;order=Importance">Open
Bugs</a><br/>
+                    <a href="http://mail-archives.apache.org/mod_mbox/tomcat-users/">Users&nbsp;Mailing&nbsp;List</a><br/>
+                    <a href="http://mail-archives.apache.org/mod_mbox/tomcat-dev/">Developers&nbsp;Mailing&nbsp;List</a><br/>
+                    <a href="irc://irc.freenode.net/#tomcat">IRC</a><br/>
+		    &nbsp;
+                  </td>
+                </tr>
+            </table>
+	    
+            <br/>
+            <table width="100%" border="1" cellspacing="0" cellpadding="3">
+                <tr>
+                  <th>Examples</th>
+                </tr>
+                <tr>
+                  <td class="menu">
+                    <a href="examples/servlets/">Servlets Examples</a><br/>
+                    <a href="examples/jsp/">JSP Examples</a><br/>
+                    <a href="webdav/">WebDAV&nbsp;capabilities</a><br/>
+     		    &nbsp;
+                  </td>
+                </tr>
+            </table>
+	    
+            <br/>
+            <table width="100%" border="1" cellspacing="0" cellpadding="3">
+                <tr>
+		  <th>Miscellaneous</th>
+                </tr>
+                <tr>
+                  <td class="menu">
+                    <a href="http://java.sun.com/products/jsp">Sun's&nbsp;Java&nbsp;Server&nbsp;Pages&nbsp;Site</a><br/>
+                    <a href="http://java.sun.com/products/servlet">Sun's&nbsp;Servlet&nbsp;Site</a><br/>
+    		    &nbsp;
+                  </td>
+                </tr>
+            </table>
+        </td>
+
+        <td style="width:20px">&nbsp;</td>
+	
+        <!-- Body -->
+        <td align="left" valign="top">
+          <p id="congrats">If you're seeing this page via a web browser, it means you've
setup Tomcat successfully. Congratulations!</p>
+ 
+          <p>As you may have guessed by now, this is the default Tomcat home page.
It can be found on the local filesystem at:</p>
+          <p class="code">$CATALINA_HOME/webapps/ROOT/index.jsp</p>
+	  
+          <p>where "$CATALINA_HOME" is the root of the Tomcat installation directory.
If you're seeing this page, and you don't think you should be, then either you're either a
user who has arrived at new installation of Tomcat, or you're an administrator who hasn't
got his/her setup quite right. Providing the latter is the case, please refer to the <a
href="tomcat-docs">Tomcat Documentation</a> for more detailed setup and administration
information than is found in the INSTALL file.</p>
+
+            <p><b>NOTE: For security reasons, using the administration webapp
+            is restricted to users with role "admin". The manager webapp
+            is restricted to users with role "manager".</b>
+            Users are defined in <code>$CATALINA_HOME/conf/tomcat-users.xml</code>.</p>
+
+            <p>Included with this release are a host of sample Servlets and JSPs (with
associated source code), extensive documentation, and an introductory guide to developing
web applications.</p>
+
+            <p>Tomcat mailing lists are available at the Tomcat project web site:</p>
+
+           <ul>
+               <li><b><a href="mailto:users@tomcat.apache.org">users@tomcat.apache.org</a></b>
for general questions related to configuring and using Tomcat</li>
+               <li><b><a href="mailto:dev@tomcat.apache.org">dev@tomcat.apache.org</a></b>
for developers working on Tomcat</li>
+           </ul>
+
+            <p>Thanks for using Tomcat!</p>
+
+            <p id="footer"><img src="tomcat-power.gif" width="77" height="80" alt="Powered
by Tomcat"/><br/>
+	    &nbsp;
+
+	    Copyright &copy; 1999-2006 Apache Software Foundation<br/>
+            All Rights Reserved
+            </p>
+        </td>
+
+    </tr>
+</table>
+
+</body>
+</html>

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/index.g
------------------------------------------------------------------------------
    svn:eol-style = CRLF

Added: harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g?view=auto&rev=540850
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g Tue May 22 23:08:02
2007
@@ -0,0 +1,116 @@
+<!--
+ 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.
+-->
+<html>
+  <head>
+    <title>JSP 2.0 Expression Language - Basic Comparisons</title>
+  </head>
+  <body>
+    <h1>JSP 2.0 Expression Language - Basic Comparisons</h1>
+    <hr>
+    This example illustrates basic Expression Language comparisons.
+    The following comparison operators are supported:
+    <ul>
+      <li>Less-than (&lt; or lt)</li>
+      <li>Greater-than (&gt; or gt)</li>
+      <li>Less-than-or-equal (&lt;= or le)</li>
+      <li>Greater-than-or-equal (&gt;= or ge)</li>
+      <li>Equal (== or eq)</li>
+      <li>Not Equal (!= or ne)</li>
+    </ul>
+    <blockquote>
+      <u><b>Numeric</b></u>
+      <code>
+        <table border="1">
+          <thead>
+	    <td><b>EL Expression</b></td>
+	    <td><b>Result</b></td>
+	  </thead>
+	  <tr>
+	    <td>${1 &lt; 2}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${1 lt 2}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${1 &gt; (4/2)}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${1 &gt; (4/2)}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${4.0 &gt;= 3}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${4.0 ge 3}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${4 &lt;= 3}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${4 le 3}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${100.0 == 100}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${100.0 eq 100}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${(10*10) != 100}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${(10*10) ne 100}</td>
+	    <td>false</td>
+	  </tr>
+	</table>
+      </code>
+      <br>
+      <u><b>Alphabetic</b></u>
+      <code>
+        <table border="1">
+          <thead>
+	    <td><b>EL Expression</b></td>
+	    <td><b>Result</b></td>
+	  </thead>
+	  <tr>
+	    <td>${'a' &lt; 'b'}</td>
+	    <td>true</td>
+	  </tr>
+	  <tr>
+	    <td>${'hip' &gt; 'hit'}</td>
+	    <td>false</td>
+	  </tr>
+	  <tr>
+	    <td>${'4' &gt; 3}</td>
+	    <td>true</td>
+	  </tr>
+	</table>
+      </code>
+    </blockquote>
+  </body>
+</html>

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/tomcat-scenario/jsp_ex.g
------------------------------------------------------------------------------
    svn:eol-style = CRLF



Mime
View raw message