Author: jfrederic.clere(a)jboss.com
Date: 2009-01-21 04:21:03 -0500 (Wed, 21 Jan 2009)
New Revision: 2189
Modified:
trunk/mod_cluster/test/java/build.xml
trunk/mod_cluster/test/java/installhttpd.sh
Log:
Arrange windoze tests.
Modified: trunk/mod_cluster/test/java/build.xml
===================================================================
--- trunk/mod_cluster/test/java/build.xml 2009-01-21 08:55:46 UTC (rev 2188)
+++ trunk/mod_cluster/test/java/build.xml 2009-01-21 09:21:03 UTC (rev 2189)
@@ -102,14 +102,25 @@
</exec>
</target>
<target name="httpd" depends="installhttpd">
- <exec executable="${base.path}/opt/jboss/httpd/sbin/apachectl">
+ <copy file="apachectl.bat" tofile="apache.bat" />
+ <replace file="apache.bat" token="@BASELOC@"
value="${base.path}"/>
+ <exec executable="${base.path}/opt/jboss/httpd/sbin/apachectl"
os="Linux,SunOS,HP-UX">
<arg value="start"/>
</exec>
+ <exec executable="apache.bat" os="Windows 2003">
+ <arg value="start"/>
+ </exec>
</target>
<target name="stophttpd">
- <exec executable="${base.path}/opt/jboss/httpd/sbin/apachectl">
+ <exec executable="${base.path}/opt/jboss/httpd/sbin/apachectl"
os="Linux,SunOS,HP-UX">
<arg value="stop"/>
</exec>
+ <exec executable="${base.path}/httpd-2.2/bin/httpd.exe" os="Windows
2003">
+ <arg value="-k stop"/>
+ </exec>
+ <exec executable="${base.path}/httpd-2.2/bin/httpd.exe" os="Windows
2003">
+ <arg value="-k uninstall"/>
+ </exec>
</target>
<!-- Run the tests -->
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-01-21 08:55:46 UTC (rev 2188)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-01-21 09:21:03 UTC (rev 2189)
@@ -128,18 +128,11 @@
fi
TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
-# prevent spaces...
-counts=`echo $BASELOC | wc -w`
-if [ $counts != "1" ]
-then
- BASELOC=BASELOC
- mkdir -p ${BASELOC}
-fi
export BASELOC
echo "Base is: $BASELOC !!!"
# Clean previous install
-rm -rf $BASELOC/$BASEHTTPD
+rm -rf "$BASELOC/$BASEHTTPD"
case ${EXT} in
tar.gz)
(cd $BASELOC
@@ -165,11 +158,11 @@
mv $file.new $file
;;
*)
- (cd $BASELOC
+ (cd "$BASELOC"
unzip ${TARBALL}
)
# Arrange the installed files
- (cd $BASELOC/httpd-2.2/bin
+ (cd "$BASELOC/httpd-2.2/bin"
./installconf.bat
)
;;
@@ -177,12 +170,12 @@
#
# Arrange httpd.conf
-file=$BASELOC/${BASEHTTPDCONF}/httpd.conf
-cp -p $file $file.new
+file="$BASELOC/${BASEHTTPDCONF}/httpd.conf"
+cp -p "$file" "$file.new"
echo "s/Listen 80.*/Listen @IP@:8000/" > sed.cmd
echo "s/LoadModule proxy_balancer/#LoadModule proxy_balancer/" >>
sed.cmd
-sed -f sed.cmd $file > $file.new
-cat >> $file.new <<EOF
+sed -f sed.cmd "$file" > "$file.new"
+cat >> "$file.new" <<EOF
<IfModule manager_module>
Listen @IP@:6666
ManagerBalancerName mycluster
@@ -204,12 +197,12 @@
echo "s/@IP@/${IP}/" > sed.cmd
echo "s/@ADVIP@/${ADVIP}/" >> sed.cmd
echo "s/@SUBIP@/${SUBIP}/" >> sed.cmd
-sed -f sed.cmd $file.new > $file.new.1
+sed -f sed.cmd "$file.new" > "$file.new.1"
# replace httpd.conf by the new file.
-mv $file $file.`date +%y%m%d.%H%M%S`.1.org
-mv $file.new.1 $file
+mv "$file" "$file.`date +%y%m%d.%H%M%S`.1.org"
+mv "$file.new.1" "$file"
# restore the execute permissions.
-chmod a+x $BASELOC/${BASEHTTPDSBIN}/*
-chmod a+x $BASELOC/${BASEHTTPD}/bin/*
+chmod a+x "$BASELOC/${BASEHTTPDSBIN}"/*
+chmod a+x "$BASELOC/${BASEHTTPD}"/bin/*
Show replies by date