Author: jfrederic.clere(a)jboss.com
Date: 2009-02-23 08:20:43 -0500 (Mon, 23 Feb 2009)
New Revision: 2314
Modified:
trunk/build/unix/buildtest.mod_cluster.sh
trunk/mod_cluster/test/java/build.properties.default
trunk/mod_cluster/test/java/build.xml
trunk/mod_cluster/test/java/installhttpd.sh
Log:
In fact it is not possible to export in build.sh (or others) and except to have the
variable in a shell started by ant.
Modified: trunk/build/unix/buildtest.mod_cluster.sh
===================================================================
--- trunk/build/unix/buildtest.mod_cluster.sh 2009-02-20 10:15:33 UTC (rev 2313)
+++ trunk/build/unix/buildtest.mod_cluster.sh 2009-02-23 13:20:43 UTC (rev 2314)
@@ -42,11 +42,19 @@
# the stuff is in
/home/jfclere/jbossnative/trunk/build/unix/work/mod_cluster-1.0.0.dev-src/srclib/mod_cluster/src/test/java
# $root is
/home/jfclere/jbossnative/trunk/build/unix/work/mod_cluster-1.0.0.dev-src/output/linux2-x64
anttestsdir=`cd $root/../../srclib/mod_cluster/test/java; pwd`
-BUILDTEST=Y
-export BUILDTEST
-export root
+# Exporting stuff to use in install won't work so use -Dbla=bla
+# 1.0.0.dev = 1.0.0-SNAPSHOT
+# 1.0.0.Beta4 = 1.0.0.Beta4
+case $build_version
+ *.dev)
+ mvn_version=`echo ${build_version} | sed 's:.dev:-SNAPSHOT:'`
+ ;;
+ *)
+ mvn_version=${build_version}
+ ;;
+esac
(cd $anttestsdir
- ant
+ ant -DBUILDTEST=Y -Dbuild_version=${build_version} -Droot=$root
-Dmvn_version=${Dmvn_version}
) || exit 1
echo ""
Modified: trunk/mod_cluster/test/java/build.properties.default
===================================================================
--- trunk/mod_cluster/test/java/build.properties.default 2009-02-20 10:15:33 UTC (rev
2313)
+++ trunk/mod_cluster/test/java/build.properties.default 2009-02-23 13:20:43 UTC (rev
2314)
@@ -1,4 +1,8 @@
test.failonerror=true
+BUILDTEST=N
+build_version=1.0.0.dev
+mvn_version=1.0.0-SNAPSHOT
+root=.
base-apache.loc=http://archive.apache.org/dist/
base.path=${user.home}/java
@@ -42,4 +46,4 @@
jboss-ejb-api.jar.loc=${base-jboss.loc}/jboss-ejb-api/${jboss-ejb-api.version}/jboss-ejb-api-${jboss-ejb-api.version}.jar
jboss-ejb-api.jar=${base.path}/${jboss-ejb-api.version}/jboss-ejb-api-spi-${jboss-ejb-api.version}.jar
-mod_cluster.jar=../../target/mod-cluster-1.0.0-SNAPSHOT.jar
+mod_cluster.jar=../../target/mod-cluster-${mvn_version}.jar
Modified: trunk/mod_cluster/test/java/build.xml
===================================================================
--- trunk/mod_cluster/test/java/build.xml 2009-02-20 10:15:33 UTC (rev 2313)
+++ trunk/mod_cluster/test/java/build.xml 2009-02-23 13:20:43 UTC (rev 2314)
@@ -100,6 +100,12 @@
<mkdir dir="${base.apache}" />
<exec executable="bash">
<arg value="installhttpd.sh"/>
+ <arg value="localhost"/>
+ <arg value="232.0.0.2"/>
+ <arg value="127.0.0.1"/>
+ <arg value="${BUILDTEST}"/>
+ <arg value="${build_version}"/>
+ <arg value="${root}"/>
</exec>
</target>
<target name="httpd" depends="installhttpd">
Modified: trunk/mod_cluster/test/java/installhttpd.sh
===================================================================
--- trunk/mod_cluster/test/java/installhttpd.sh 2009-02-20 10:15:33 UTC (rev 2313)
+++ trunk/mod_cluster/test/java/installhttpd.sh 2009-02-23 13:20:43 UTC (rev 2314)
@@ -4,9 +4,15 @@
# $1: IP address to listen (both for normal requests and cluster management ones.
# $2: IP address for the advertise
# $3: sub network to accept cluster management requests.
+# $4: Use a binaries from a directory.
+# $5: version to build.
+# $6: root to find the binaries.
IP=localhost
ADVIP=232.0.0.2
SUBIP=127.0.0.1
+BUILDTEST=N
+build_version=1.0.0.dev
+root=.
if [ "x$1" != "x" ]
then
IP=$1
@@ -19,6 +25,18 @@
then
SUBIP=$3
fi
+if [ "x$4" != "x" ]
+then
+ BUILDTEST=$4
+fi
+if [ "x$5" != "x" ]
+then
+ build_version=$5
+fi
+if [ "x$6" != "x" ]
+then
+ root=$6
+fi
#
# Set the platform and arch for the download bundles.
@@ -111,14 +129,7 @@
;;
esac
#PACKVER=rhel-httpd-2.2.8-1.el5s2
-if [ "x${PACKAGE}" = "x" ]
-then
- PACKVER=mod_cluster-1.0.0.dev
-else
- # The PACKVER and build_version from the build.sh script.
- echo "Using ${build_version} for ${PACKVER}"
- PACKVER=${PACKAGE}-${build_version}
-fi
+PACKVER=mod_cluster-${build_version}
# Something like (note don't use ssl for the moment.
#
http://hudson.qa.jboss.com/hudson/view/Native/job/mod_cluster-linux-x86_6...
@@ -136,7 +147,7 @@
ant downloadfile -Dsourcefile=${TARBALL}
-Ddestfile=${PACKVER}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir="$BASELOC"
fi
else
- if [ "x${BUILDTEST}" = "x" ]
+ if [ "x${BUILDTEST}" = "N" ]
then
rm -f ${PACKVER}-${BUILD_SYS}-${BUILD_CPU}.${EXT}
ant downloadfile -Dsourcefile=${TARBALL}
-Ddestfile=${PACKVER}-${BUILD_SYS}-${BUILD_CPU}.${EXT} -Ddestdir="$BASELOC"