Author: alex.guizar(a)jboss.com
Date: 2010-04-16 20:11:15 -0400 (Fri, 16 Apr 2010)
New Revision: 6261
Modified:
jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh
Log:
ensure maven surefire tests in hudson get a maximum memory amount of at least 256m
Modified: jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh
===================================================================
--- jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh 2010-04-15 20:04:36 UTC (rev
6260)
+++ jbpm3/branches/jbpm-3.2-soa/hudson/hudson-home/command.sh 2010-04-17 00:11:15 UTC (rev
6261)
@@ -164,9 +164,18 @@
echo $MVN_CMD; $MVN_CMD | tee $WORKSPACE/dependency-tree.txt
#
+# Calculate surefire max memory
+#
+TOTAL_MEM=`free -mo | grep Mem | awk '{ print $2 }'`
+echo Total memory\: $TOTAL_MEM
+MAX_MEM=`expr $TOTAL_MEM / 4`
+[ $MAX_MEM -lt 256 ] && MAX_MEM=256
+echo Max memory\: $MAX_MEM
+
+#
# Execute tests
#
-MVN_CMD="mvn -o -fae $MVN_OPTS test"
+MVN_CMD="mvn -o -fae $MVN_OPTS -Dsurefire.jvm.args=-Xmx$MAX_MEMm test"
echo $MVN_CMD; $MVN_CMD 2>&1 | tee $WORKSPACE/tests.log
cat $WORKSPACE/tests.log | egrep FIXME\|FAILED | sort -u | tee $WORKSPACE/fixme.txt
cat $WORKSPACE/fixme.txt | egrep "\[\S*]" >
$WORKSPACE/errata-$CONTAINER.txt
Show replies by date