Author: jfrederic.clere(a)jboss.com
Date: 2008-01-18 08:30:58 -0500 (Fri, 18 Jan 2008)
New Revision: 1289
Added:
trunk/build/unix/buildtest.rhel-httpd.hpux.sh
trunk/build/unix/buildtest.rhel-httpd.windows.sh
trunk/build/unix/util/installjboss.sh
Removed:
trunk/build/unix/buildtest.rhel-httpd.linux2.sh
trunk/build/unix/buildtest.rhel-httpd.solaris.sh
Modified:
trunk/build/unix/buildtest.rhel-httpd.sh
Log:
Add mod_jk test.
Use only one shell for linux2 and solaris.
Added: trunk/build/unix/buildtest.rhel-httpd.hpux.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.hpux.sh (rev 0)
+++ trunk/build/unix/buildtest.rhel-httpd.hpux.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo "Not yet supported platform"
Property changes on: trunk/build/unix/buildtest.rhel-httpd.hpux.sh
___________________________________________________________________
Name: svn:executable
+ *
Deleted: trunk/build/unix/buildtest.rhel-httpd.linux2.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.linux2.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.linux2.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -1,53 +0,0 @@
-#!/bin/sh
-# Copyright(c) 2007 Red Hat Middleware, LLC,
-# and individual contributors as indicated by the @authors tag.
-# See the copyright.txt in the distribution for a
-# full listing of individual contributors.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library in the file COPYING.LIB;
-# if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-#
-# @author Jean-Frederic Clere
-#
-# Run a test of the httpd.
-#
-# $1 : Base directory for the test.
-# $2 : Directory where the package was built.
-# $3 : Directory where downloaded packages are stored.
-# $4 : Name or IP to use for the tests.
-
-base=$1
-root=$2
-build_cache_dir=$3
-IPLOCAL=$4
-
-# Copy the package to test.
-cp -rp $root/opt/ $base/$root
-
-# Test it.
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
-sleep 5
-curl -v http://${IPLOCAL} | grep "It works\!"
-if [ $? -ne 0 ]; then
- echo "Test FAILED cant start?"
- exit 1
-fi
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
-sleep 5
-curl -v http://${IPLOCAL}
-if [ $? -eq 0 ]; then
- echo "Test FAILED can't stop"
- exit 1
-fi
Modified: trunk/build/unix/buildtest.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -21,4 +21,52 @@
#
# @author Jean-Frederic Clere
#
-echo "Not yet supported platform"
+# Run a test of the httpd.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+# $4 : Name or IP to use for the tests.
+
+base=$1
+root=$2
+build_cache_dir=$3
+IPLOCAL=$4
+
+# Install jboss (as)
+util/installjboss.sh $base $root $build_cache_dir
+
+# start it.
+JBOSSDIR=`ls ${base}/${root}/jbossas`
+${base}/${root}/jbossas/${JBOSSDIR}/bin/run.sh -b ${IPLOCAL} >
${base}/${root}/jboss.out.txt &
+
+# Copy the package to test.
+cp -rp $root/opt/ $base/$root
+
+# Add a minimal mod_jk conf to httpd.conf
+util/confjk.sh $base $root $build_cache_dir ${IPLOCAL}
+
+# Test it.
+sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
+sleep 65
+curl -v http://${IPLOCAL} | grep "It works\!"
+if [ $? -ne 0 ]; then
+ echo "Test FAILED cant start?"
+ exit 1
+fi
+
+curl -v http://${IPLOCAL}/myapp/toto | grep "JBossWeb"
+if [ $? -ne 0 ]; then
+ echo "Test FAILED cant connect to Jboss?"
+ exit 1
+fi
+
+# Stop it.
+sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
+${base}/${root}/jbossas/${JBOSSDIR}/bin/shutdown.sh -S -s ${IPLOCAL}
+sleep 5
+curl -v http://${IPLOCAL}
+if [ $? -eq 0 ]; then
+ echo "Test FAILED can't stop"
+ exit 1
+fi
Deleted: trunk/build/unix/buildtest.rhel-httpd.solaris.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.solaris.sh 2008-01-18 10:21:13 UTC (rev 1288)
+++ trunk/build/unix/buildtest.rhel-httpd.solaris.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -1,48 +0,0 @@
-#!/bin/sh
-# Copyright(c) 2007 Red Hat Middleware, LLC,
-# and individual contributors as indicated by the @authors tag.
-# See the copyright.txt in the distribution for a
-# full listing of individual contributors.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library in the file COPYING.LIB;
-# if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
-#
-# @author Jean-Frederic Clere
-#
-# Run a test of the httpd.
-#
-base=$1
-root=$2
-build_cache_dir=$3
-IPLOCAL=$4
-
-# copy the installation in /tmp (mknod doesn't work on all file system)
-cp -rp $root/opt $base/$root
-
-# start the test.
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl start
-sleep 5
-curl -v http://${IPLOCAL} | grep "It works\!"
-if [ $? -ne 0 ]; then
- echo "Test FAILED cant start?"
- exit 1
-fi
-sudo /usr/sbin/chroot $base/$root /opt/jboss/httpd/sbin/apachectl stop
-sleep 5
-curl -v http://${IPLOCAL}
-if [ $? -eq 0 ]; then
- echo "Test FAILED can't stop"
- exit 1
-fi
Added: trunk/build/unix/buildtest.rhel-httpd.windows.sh
===================================================================
--- trunk/build/unix/buildtest.rhel-httpd.windows.sh (rev 0)
+++ trunk/build/unix/buildtest.rhel-httpd.windows.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,24 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+echo "Not yet supported platform"
Property changes on: trunk/build/unix/buildtest.rhel-httpd.windows.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/util/installjboss.sh
===================================================================
--- trunk/build/unix/util/installjboss.sh (rev 0)
+++ trunk/build/unix/util/installjboss.sh 2008-01-18 13:30:58 UTC (rev 1289)
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright(c) 2008 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+#
+
+# Install jboss(as) in the chrootable environment for testing.
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+# $3 : Directory where downloaded packages are stored.
+
+base=$1
+root=$2
+build_cache_dir=$3
+
+# Install jbossas
+URL=http://surfnet.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.0.GA.zip
+FILE=`basename $URL`
+mkdir -p $build_cache_dir
+if [ ! -f ${build_cache_dir}/$FILE ]; then
+ (cd ${build_cache_dir}
+ wget --tries=0 --retry-connrefused $URL
+ )
+fi
+mkdir ${base}/${root}/jbossas
+(cd ${base}/${root}/jbossas
+unzip ${build_cache_dir}/${FILE}
+)
+JBOSSDIR=`ls ${base}/${root}/jbossas`
+echo "Installed ${JBOSSDIR} for tests."
Property changes on: trunk/build/unix/util/installjboss.sh
___________________________________________________________________
Name: svn:executable
+ *