ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1326954 - in /ace/trunk/ace-test: ./ .project ant-contrib-1.0b3.jar build.xml
Date Tue, 17 Apr 2012 07:06:36 GMT
Author: marrs
Date: Tue Apr 17 07:06:36 2012
New Revision: 1326954

URL: http://svn.apache.org/viewvc?rev=1326954&view=rev
Log:
Initial version of project that contains a test script for running performance tests.

Added:
    ace/trunk/ace-test/
    ace/trunk/ace-test/.project
    ace/trunk/ace-test/ant-contrib-1.0b3.jar   (with props)
    ace/trunk/ace-test/build.xml

Added: ace/trunk/ace-test/.project
URL: http://svn.apache.org/viewvc/ace/trunk/ace-test/.project?rev=1326954&view=auto
==============================================================================
--- ace/trunk/ace-test/.project (added)
+++ ace/trunk/ace-test/.project Tue Apr 17 07:06:36 2012
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ace-test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>

Added: ace/trunk/ace-test/ant-contrib-1.0b3.jar
URL: http://svn.apache.org/viewvc/ace/trunk/ace-test/ant-contrib-1.0b3.jar?rev=1326954&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ace/trunk/ace-test/ant-contrib-1.0b3.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ace/trunk/ace-test/build.xml
URL: http://svn.apache.org/viewvc/ace/trunk/ace-test/build.xml?rev=1326954&view=auto
==============================================================================
--- ace/trunk/ace-test/build.xml (added)
+++ ace/trunk/ace-test/build.xml Tue Apr 17 07:06:36 2012
@@ -0,0 +1,74 @@
+<project>
+	<!-- Remove any 'with-' properties or comment them out to get rid of them. -->
+	<property name="with-server" value="true" />
+	<property name="with-targets" value="true" />
+	
+	<!-- Misc. properties that influence the setup of the test. -->
+	<property name="version" value="0.8.1-SNAPSHOT" />
+	<property name="server-host" value="http://localhost:8080" />
+	<property name="targets" value="one" />
+	<property name="targets-26" value="a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"
/>
+	<property name="targets-100" value="00,01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99"
/>
+
+	<taskdef resource="net/sf/antcontrib/antlib.xml">
+		<classpath>
+			<pathelement location="ant-contrib-1.0b3.jar"/>
+		</classpath>
+	</taskdef>
+
+	<!-- Public targets. -->
+	
+	<target name="unzip" depends="unzip-server, unzip-targets" description="Unzips all artifacts
into the current directory so they're ready to run." />
+	<target name="run" depends="run-all" description="Runs all nodes (server and/or targets)
so they can be tested." />
+	<target name="rm" depends="rm-server, rm-targets" description="Removes all artifacts
from the current directory." />
+
+	<!-- Private targets. -->
+	
+	<target name="unzip-server" if="with-server">
+		<unzip src="../ace-target-devserver/target/org.apache.ace.target.devserver-${version}-distribution.zip"
dest="." />
+	</target>
+
+	<target name="unzip-targets" if="with-targets">
+		<for list="${targets}" param="target">
+			<sequential>
+				<mkdir dir="target-@{target}" />
+				<copy file="../ace-launcher/target/org.apache.ace.launcher-${version}.jar" tofile="target-@{target}/launcher.jar"
/>
+			</sequential>
+		</for>
+	</target>
+	
+	<target name="run-all">
+		<parallel>
+			<sequential>
+				<antcall target="run-server" />
+			</sequential>
+			<sequential>
+				<antcall target="run-targets" />
+			</sequential>
+		</parallel>
+	</target>
+
+	<target name="run-server" if="with-server">
+		<exec dir="ace-devserver" command="sh run.sh" />
+	</target>
+	
+	<target name="run-targets" if="with-targets">
+		<for list="${targets}" param="target" parallel="true" threadCount="100">
+			<sequential>
+				<exec dir="target-@{target}" command="java -Xmx16m -jar launcher.jar identification=target-@{target}
discovery=${server-host}" />
+			</sequential>
+		</for>
+	</target>
+
+	<target name="rm-server" if="with-server">
+		<delete dir="ace-devserver" />
+	</target>
+
+	<target name="rm-targets" if="with-targets">
+		<for list="${targets}" param="target">
+			<sequential>
+				<delete dir="target-@{target}" />
+			</sequential>
+		</for>
+	</target>
+</project>



Mime
View raw message