JBoss Native SVN: r2652 - trunk/build/unix.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2010-03-28 12:39:48 -0400 (Sun, 28 Mar 2010)
New Revision: 2652
Added:
trunk/build/unix/buildtest.traffic_server.sh
Log:
Add a test for traffic_server
Added: trunk/build/unix/buildtest.traffic_server.sh
===================================================================
--- trunk/build/unix/buildtest.traffic_server.sh (rev 0)
+++ trunk/build/unix/buildtest.traffic_server.sh 2010-03-28 16:39:48 UTC (rev 2652)
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Copyright(c) 2010 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 traffic_server.
+#
+# $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.
+# $5 : Do the SSL stuff.
+
+base=$1
+root=$2
+build_cache_dir=$3
+IPLOCAL=$4
+loc_has_ssl=$5
+
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2009-10-29 08:26:17 +0100 (Thu, 29 Oct 2009) $"
+echo ""
+
+# it seems MgmtAPI has a problem for the moment (we use kill to stop traffic_server).
+(cd ${root}
+TS_ROOT=${root}//opt/jboss/ts opt/jboss/ts/bin/traffic_server &
+sleep 10
+curl -v http://localhost:8080/ 2>&1 | grep ApacheTrafficServer || exit 1
+PID=`ps -ef | grep traffic_server | grep -v grep | awk '/\/bin\/traffic_server/ { print $2 } '`
+echo "Stopping traffic_server ($PID)"
+kill -15 ${PID}
+) || exit 1
+
+#[jfclere@jfcpc linux2-x64]$ TS_ROOT=/home/jfclere/jbossnative/trunk/build/unix/work/traffic_server-TS_Trunk-src/output/linux2-x64//opt/jboss/ts opt/jboss/ts/bin/traffic_server
+
+echo ""
+echo "SUCCESS : `basename $0` $LastChangedDate: 2009-10-29 08:26:17 +0100 (Thu, 29 Oct 2009) $"
+echo ""
+exit 0