You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2007/12/04 07:26:14 UTC
svn commit: r600801 -
/harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml
Author: smishura
Date: Mon Dec 3 22:26:12 2007
New Revision: 600801
URL: http://svn.apache.org/viewvc?rev=600801&view=rev
Log:
Apply modified patch from HARMONY-5007:
[buildtest][eut] adaptor must check Linux limitations
Modified:
harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml
Modified: harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml?rev=600801&r1=600800&r2=600801&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml (original)
+++ harmony/enhanced/buildtest/branches/2.0/tests/eut/build.xml Mon Dec 3 22:26:12 2007
@@ -174,9 +174,38 @@
<isset property="is.linux" />
</condition>
+ <!-- ======== check host configuration ===== -->
+ <target name="check-linux-config" if="is.linux">
+ <check-limit option="-n" value="8128" name="open files" />
+ <check-limit option="-s" value="8128" name="stack size" />
+ <check-limit option="-m" value="2000000" name="max memory size" />
+ </target>
+
+ <macrodef name="check-limit">
+ <attribute name="option" />
+ <attribute name="value" />
+ <attribute name="name" />
+ <sequential>
+
+ <exec executable="/bin/sh" resultproperty="exit.code.@{option}">
+ <arg value="-c" />
+ <arg value="test @{value} -le `ulimit @{option} | sed 's#unlimited#@{value}#'`" />
+ </exec>
+
+ <fail message="Host configuration: limit for @{name} should be at least @{value}">
+ <condition>
+ <not>
+ <equals arg1="${exit.code.@{option}}" arg2="0" />
+ </not>
+ </condition>
+ </fail>
+ </sequential>
+ </macrodef>
+
+
<!-- ================ Setup ================ -->
<target name="setup"
- depends="install.eut,install.eclipse,setup.configuration,build.reporter"
+ depends="check-linux-config,install.eut,install.eclipse,setup.configuration,build.reporter"
description="Download and install EUT, Eclipse SDK; configuring EUT settings">
</target>
@@ -235,7 +264,7 @@
refid="test.jre.home.path.id" />
<target name="run"
- depends="run.configuration,run.tests,run.postprocess"
+ depends="check-linux-config,run.configuration,run.tests,run.postprocess"
description="Configure and run EUT, process results">
</target>