Author: jfrederic.clere(a)jboss.com
Date: 2009-10-13 06:50:43 -0400 (Tue, 13 Oct 2009)
New Revision: 2577
Modified:
sandbox/httpd/httpd.test
Log:
Arrange the logic: make httpd-trunk tests optional.
Modified: sandbox/httpd/httpd.test
===================================================================
--- sandbox/httpd/httpd.test 2009-10-13 07:37:30 UTC (rev 2576)
+++ sandbox/httpd/httpd.test 2009-10-13 10:50:43 UTC (rev 2577)
@@ -38,8 +38,8 @@
svn checkout
http://svn.apache.org/repos/asf/apr/apr-util/branches/1.3.x apr-util-1.3.x
svn checkout
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x httpd-2.2.x
-svn checkout
http://svn.apache.org/repos/asf/tomcat/connectors/trunk/jk jk-trunk
-svn checkout
http://anonsvn.jboss.org/repos/jbossnative/trunk/mod_cluster mod_cluster
+svn checkout
http://svn.apache.org/repos/asf/tomcat/jk/trunk/ jk-trunk
+svn checkout
http://anonsvn.jboss.org/repos/mod_cluster/trunk/ mod_cluster
#
# Copy the mod_cluster code into httpd-2.2.x/modules/proxy
@@ -49,7 +49,7 @@
cp mod_cluster/native/mod_proxy_cluster/mod_proxy_cluster.c httpd-2.2.x/modules/proxy
cp mod_cluster/native/mod_proxy_cluster/patch.txt httpd-2.2.x/modules/proxy
cp mod_cluster/native/include/*.h httpd-2.2.x/modules/proxy
- grep proxy_cluster_objs httpd-2.2.x/modules/proxy/config.m4 2&>1
+ grep proxy_cluster_objs httpd-2.2.x/modules/proxy/config.m4 2>&1
if [ $? -eq 0 ]; then
echo "httpd-2.2.x/modules/proxy/config.m4 already patches"
else
@@ -123,7 +123,8 @@
make install
)
if [ $? -ne 0 ]; then
- exit 1
+ echo "Can't build httpd-trunk"
+ #exit 1
fi
# Build httpd 2.2.x
@@ -154,6 +155,7 @@
make install
)
if [ $? -ne 0 ]; then
+ echo "Can't build httpd-2.2.x"
exit 1
fi
@@ -161,31 +163,32 @@
# Build mod_jk
(cd jk-trunk/native
./buildconf.sh
-./configure --with-apxs=$HOME/$TMPLOC/APACHE/bin/apxs
+./configure --with-apxs=$HOME/$TMPLOC/APACHE-2.2.x/bin/apxs
make clean
make
make install
)
if [ $? -ne 0 ]; then
+ echo "Can't build jk-trunk"
exit 1
fi
# Build the mod_cluster modules with httpd-2.2.x
-#(cd $HOME/$TMPLOC/mod_cluster/native/mod_proxy_cluster
-#./buildconf
-#./configure --with-apache=$HOME/$TMPLOC/APACHE-2.2.x
-#make clean
-#make
-#)
-#if [ $? -ne 0 ]; then
-# echo "Build mod_cluster/native/mod_proxy_cluster FAILED"
-# exit 1
-#fi
+(cd $HOME/$TMPLOC/mod_cluster/native/mod_proxy_cluster
+./buildconf
+./configure --with-apxs=$HOME/$TMPLOC/APACHE-2.2.x/bin/apxs
+make clean
+make
+)
+if [ $? -ne 0 ]; then
+ echo "Build mod_cluster/native/mod_proxy_cluster FAILED"
+ exit 1
+fi
(cd $HOME/$TMPLOC/mod_cluster/native/mod_manager
./buildconf
-./configure --with-apache=$HOME/$TMPLOC/APACHE-2.2.x
+./configure --with-apxs=$HOME/$TMPLOC/APACHE-2.2.x/bin/apxs
make clean
make
)
@@ -195,7 +198,7 @@
fi
(cd $HOME/$TMPLOC/mod_cluster/native/mod_slotmem
./buildconf
-./configure --with-apache=$HOME/$TMPLOC/APACHE-2.2.x
+./configure --with-apxs=$HOME/$TMPLOC/APACHE-2.2.x/bin/apxs
make clean
make
)
@@ -203,28 +206,54 @@
echo "Build mod_cluster/native/mod_slotmem FAILED"
exit 1
fi
+(cd $HOME/$TMPLOC/mod_cluster/native/advertise
+./buildconf
+./configure --with-apxs=$HOME/$TMPLOC/APACHE-2.2.x/bin/apxs
+make clean
+make
)
if [ $? -ne 0 ]; then
+ echo "Build mod_cluster/native/advertise FAILED"
+ exit 1
+fi
+)
+if [ $? -ne 0 ]; then
echo "Build FAILED"
exit 1
fi
+rc=0
# Test trunk
(cd $HOME/$TMPLOC/APACHE
bin/apachectl start
)
if [ $? -ne 0 ]; then
- echo "Start FAILED"
- exit 1
+ echo "Start APACHE FAILED"
+ rc=1
fi
-rc=0
curl -v
http://localhost:7779 | grep "It works\!"
if [ $? -ne 0 ]; then
- echo "Test FAILED"
+ echo "Test APACHE FAILED"
rc=1
fi
(cd $HOME/$TMPLOC/APACHE
bin/apachectl stop
)
+# Test 2.2.x
+(cd $HOME/$TMPLOC/APACHE-2.2.x
+ bin/apachectl start
+)
+if [ $? -ne 0 ]; then
+ echo "Start APACHE-2.2.x FAILED"
+ rc=1
+fi
+curl -v
http://localhost:7779 | grep "It works\!"
+if [ $? -ne 0 ]; then
+ echo "Test APACHE-2.2.x FAILED"
+ rc=1
+fi
+(cd $HOME/$TMPLOC/APACHE-2.2.x
+ bin/apachectl stop
+)
echo "DONE"
exit $rc