Author: doogie
Date: Thu Mar 5 06:04:34 2009 New Revision: 750326 URL: http://svn.apache.org/viewvc?rev=750326&view=rev Log: Woop. doing 'ant run-test-list' will now run each test case completely isolated from any other test. The granularity it uses for this is each <test-case> inside a <test-suite> is run separately. This might not be the right approach; but at least this gives us a way to do it. Modified: ofbiz/trunk/.hgignore ofbiz/trunk/build.xml ofbiz/trunk/runtime/ (props changed) Modified: ofbiz/trunk/.hgignore URL: http://svn.apache.org/viewvc/ofbiz/trunk/.hgignore?rev=750326&r1=750325&r2=750326&view=diff ============================================================================== --- ofbiz/trunk/.hgignore (original) +++ ofbiz/trunk/.hgignore Thu Mar 5 06:04:34 2009 @@ -11,3 +11,5 @@ ^debian/ofbiz(|-(framework|applications|specialpurpose))\.debhelper\.log$ ^debian/ofbiz(|-(framework|applications|specialpurpose))\.(pre|post)(inst|rm)\.debhelper$ ^debian/ofbiz(|-(framework|applications|specialpurpose))\.substvars$ ++^runtime/data.zip$ ++^runtime/test-list-build.xml$ Modified: ofbiz/trunk/build.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.xml?rev=750326&r1=750325&r2=750326&view=diff ============================================================================== --- ofbiz/trunk/build.xml (original) +++ ofbiz/trunk/build.xml Thu Mar 5 06:04:34 2009 @@ -57,6 +57,8 @@ <subant target="clean-data"> <filelist dir="." files="framework/build.xml"/> </subant> + <delete file="runtime/data.zip"/> + <delete file="runtime/test-list-build.xml"/> </target> <target name="clean-logs"> @@ -383,7 +385,54 @@ <arg value="test"/> </java> </target> + <target name="save-runtime-data"> + <delete file="runtime/data.zip"/> + <zip zipfile="runtime/data.zip" compress="no"> + <fileset dir="runtime/data"/> + </zip> + </target> + <target name="restore-runtime-data"> + <delete dir="runtime/data"/> + <mkdir dir="runtime/data"/> + <unzip src="runtime/data.zip" dest="runtime/data"/> + </target> + <target name="check-separated-tests-already-setup"> + <available file="runtime/test-list-build.xml" property="separated-tests-already-setup"/> + </target> + <target name="setup-separated-test-run" depends="check-separated-tests-already-setup" unless="separated-tests-already-setup"> + <subant target="clean-data"> + <filelist dir="." files="framework/build.xml"/> + </subant> + <antcall target="run-install"/> + <antcall target="save-runtime-data"/> + <java jar="ofbiz.jar" fork="true"> + <jvmarg value="${memory.initial.param}"/> + <jvmarg value="${memory.max.param}"/> + <arg value="testlist"/> + <arg file="runtime/test-list-build.xml"/> + <arg value="-ant"/> + </java> + </target> + <target name="run-single-test"> + <antcall target="restore-runtime-data"/> + <java jar="ofbiz.jar" fork="true"> + <jvmarg value="${memory.initial.param}"/> + <jvmarg value="${memory.max.param}"/> + <arg value="test"/> + <arg value="-component=${test.component}"/> + <arg value="-case=${test.case}"/> + </java> + <delete dir="runtime/logs/test-results/${test.component}-${test.case}"/> + <mkdir dir="runtime/logs/test-results/${test.component}-${test.case}"/> + <move todir="runtime/logs/test-results/${test.component}-${test.case}"> + <fileset dir="runtime/logs/test-results" includes="*.xml"/> + </move> + </target> + <target name="run-test-list" depends="setup-separated-test-run"> + <delete dir="runtime/logs/test-results"/> + <ant antfile="runtime/test-list-build.xml" target="all-tests"/> + </target> <target name="create-component" description="Creates the layout of an OFBiz component in the hot-deploy folder."> <input addproperty="component-name" message="Component name: "/> Propchange: ofbiz/trunk/runtime/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Thu Mar 5 06:04:34 2009 @@ -1,2 +1,4 @@ jetty svninfo.ftl +data.zip +test-list-build.xml |
Free forum by Nabble | Edit this page |