Author: jfrederic.clere(a)jboss.com
Date: 2008-01-16 11:04:10 -0500 (Wed, 16 Jan 2008)
New Revision: 1279
Added:
trunk/build/unix/buildtest.jboss-native.sh
trunk/build/unix/buildtest.jboss-native.windows.sh
Modified:
trunk/build/unix/util/buildroot.linux2.sh
trunk/build/unix/util/buildroot.solaris.sh
Log:
Add a test for jboss-native library.
Added: trunk/build/unix/buildtest.jboss-native.sh
===================================================================
--- trunk/build/unix/buildtest.jboss-native.sh (rev 0)
+++ trunk/build/unix/buildtest.jboss-native.sh 2008-01-16 16:04:10 UTC (rev 1279)
@@ -0,0 +1,85 @@
+#!/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
+#
+# $1 : Base directory for the test.
+# $2 : Directory where the package was built.
+base=$1
+root=$2
+
+# Copy java
+if [ ! -d ${base}/${root}/${JAVA_HOME} ]; then
+ mkdir -p ${base}/${root}/`dirname ${JAVA_HOME}`
+ cp -rp $JAVA_HOME ${base}/${root}/${JAVA_HOME}
+fi
+
+# 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`
+
+# Copy the package to test.
+cp -rp ${root}/bin ${base}/${root}/jbossas/${JBOSSDIR}
+
+# Add the right JAVA_HOME
+echo "JAVA_HOME=$JAVA_HOME" >>
${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
+echo "export JAVA_HOME" >>
${base}/${root}/jbossas/${JBOSSDIR}/bin/run.conf
+# Create our shutdown wrapper.
+echo "#!/bin/sh" > ${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
+echo "DIRNAME=\`dirname \$0\`" >>
${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
+echo ". \$DIRNAME/run.conf" >>
${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
+echo "\$DIRNAME/shutdown.sh -S -s $IPLOCAL" >>
${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
+chmod a+x ${base}/${root}/jbossas/${JBOSSDIR}/bin/jshutdown.sh
+
+# start the jboss
+sudo /usr/sbin/chroot ${base}/${root} jbossas/${JBOSSDIR}/bin/run.sh -b ${IPLOCAL} >
${base}/${root}/jboss.out.txt &
+sleep 60
+ppid=`ps | grep run.sh | awk ' { print $1 } '`
+pid=`ps -ef | grep $ppid | grep $JAVA_HOME | grep -v grep | awk ' { print $2 } '`
+echo "Jboss started by $ppid as $pid"
+
+grep "APR capabilities:" ${base}/${root}/jboss.out.txt
+if [ $? -ne 0 ]; then
+ sudo /usr/sbin/chroot ${base}/${root} jbossas/${JBOSSDIR}/bin/jshutdown.sh
+ echo "Failed APR not loaded"
+ exit 1
+fi
+
+curl -v http://${IPLOCAL}:8080/ | grep "Welcome to JBoss" 2>/dev/null
+if [ $? -ne 0 ]; then
+ sudo /usr/sbin/chroot ${base}/${root} jbossas/${JBOSSDIR}/bin/jshutdown.sh
+ echo "Failed Connection doesn't work"
+ exit 1
+fi
+
+# Stop the jboss
+sudo /usr/sbin/chroot ${base}/${root} jbossas/${JBOSSDIR}/bin/jshutdown.sh
Property changes on: trunk/build/unix/buildtest.jboss-native.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/buildtest.jboss-native.windows.sh
===================================================================
--- trunk/build/unix/buildtest.jboss-native.windows.sh (rev 0)
+++ trunk/build/unix/buildtest.jboss-native.windows.sh 2008-01-16 16:04:10 UTC (rev 1279)
@@ -0,0 +1,28 @@
+#!/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
+#
+#
+# Run a test of the jbossweb native components.
+#
+root=$1
+echo "Not yet supported platform"
Property changes on: trunk/build/unix/buildtest.jboss-native.windows.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/build/unix/util/buildroot.linux2.sh
===================================================================
--- trunk/build/unix/util/buildroot.linux2.sh 2008-01-16 10:47:37 UTC (rev 1278)
+++ trunk/build/unix/util/buildroot.linux2.sh 2008-01-16 16:04:10 UTC (rev 1279)
@@ -24,7 +24,7 @@
# Build a chrootable environment.
# $1 : Directory where the chroot will takes place.
tools="/bin/bash /lib/ld-linux.so.2 /usr/bin/strace /etc/passwd /etc/group
/etc/hosts"
-depfiles="/bin/sh /usr/bin/test"
+depfiles="/bin/sh /usr/bin/test /usr/bin/dirname /bin/basename /bin/uname
/bin/grep"
# tools are the tools we need for the tests.
# depfiles are files the packages needed (to be generated).
files="$tools $depfiles"
Modified: trunk/build/unix/util/buildroot.solaris.sh
===================================================================
--- trunk/build/unix/util/buildroot.solaris.sh 2008-01-16 10:47:37 UTC (rev 1278)
+++ trunk/build/unix/util/buildroot.solaris.sh 2008-01-16 16:04:10 UTC (rev 1279)
@@ -24,7 +24,7 @@
# Build a chrootable environment.
# $1 : Directory where the chroot will takes place.
tools="/bin/bash /etc/passwd /etc/group /etc/hosts /etc/netconfig /etc/resolv.conf
/etc/inet/ipnodes /usr/lib/ld.so.1"
-depfiles="/bin/sh /usr/bin/test"
+depfiles="/bin/sh /usr/bin/test /usr/bin/dirname /bin/basename /bin/uname
/bin/grep"
# tools are the tools we need for the tests.
# depfiles are files the packages needed (to be generated).
files="$tools $depfiles"
Show replies by date