Author: jfrederic.clere(a)jboss.com
Date: 2008-12-12 05:49:49 -0500 (Fri, 12 Dec 2008)
New Revision: 2133
Modified:
trunk/mod_cluster/test/java/build.xml
trunk/mod_cluster/test/java/installhttpd.sh
Log:
arrange tests:
- untar doesn't support symlinks for the moment.
- stop httpd after the test even if it fails.
- always install a new bundle.
Modified: trunk/mod_cluster/test/java/build.xml
===================================================================
--- trunk/mod_cluster/test/java/build.xml 2008-12-11 16:44:59 UTC (rev 2132)
+++ trunk/mod_cluster/test/java/build.xml 2008-12-12 10:49:49 UTC (rev 2133)
@@ -93,7 +93,10 @@
<target name="testhttpd">
<available file="${base.path}/opt/jboss/httpd/sbin/apachectl"
property="exist"/>
</target>
+ <!--
<target name="installhttpd" unless="exist"
depends="testhttpd">
+ -->
+ <target name="installhttpd">
<exec executable="bash">
<arg value="installhttpd.sh"/>
</exec>
@@ -112,13 +115,21 @@
<!-- Run the tests -->
<target name="all" depends="compile,httpd">
<copy file="conf/web.xml" todir="${test.classes}/conf"/>
- <java dir="${test.classes}" classname="${test.runner}"
fork="yes" failonerror="${test.failonerror}">
+ <java dir="${test.classes}" classname="${test.runner}"
fork="yes" resultproperty="test.failure">
<arg value="org.jboss.mod_cluster.Maintest"/>
<jvmarg line="-Dcluster=${cluster}"/>
<classpath refid="tomcat.test.classpath"/>
</java>
<antcall target="stophttpd">
</antcall>
+
+ <condition property="build.failed">
+ <not>
+ <equals arg1="${test.failure}" arg2="0"/>
+ </not>
+ </condition>
+ <fail if="build.failed" message="Build Failed!"/>
+
</target>
<target name="extra" depends="compile">
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2008-12-11 16:44:59 UTC (rev 2132)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2008-12-12 10:49:49 UTC (rev 2133)
@@ -107,14 +107,26 @@
#
http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-linux-x86_6...
#
http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-solaris-x86...
TARBALL=http://hudson.qa.jboss.com/hudson/view/Native/job/${BASE}/lastSuc...
-ant downloadgz -Dsourcefile=${TARBALL} -Ddestfile=opt/jboss/httpd/sbin/apachectl
-if [ $? -ne 0 ]; then
- echo "Download of $TARBALL failed"
-fi
BASELOC=`ant base | grep echo | awk '{ print $2 }'`
+rm -f ${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
+wget ${TARBALL}
+TARBALL=`pwd`/${PACKAGE}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
export BASELOC
echo "Base is: $BASELOC !!!"
-
+# Clean previous install
+rm -rf $BASELOC/opt/jboss
+case ${EXT} in
+ tar.gz)
+ (cd $BASELOC
+ gzip -dc ${TARBALL} | tar xvf -
+ )
+ ;;
+ *)
+ (cd $BASELOC
+ unzip ${TARBALL}
+ )
+ ;;
+esac
#
# Arrange the installed files
#