From: <st...@us...> - 2007-01-31 17:32:57
|
Revision: 3853 http://svn.sourceforge.net/smartfrog/?rev=3853&view=rev Author: steve_l Date: 2007-01-31 09:32:34 -0800 (Wed, 31 Jan 2007) Log Message: ----------- running system tests on these components Modified Paths: -------------- trunk/core/components/database/build.xml trunk/core/components/junit/build.xml Modified: trunk/core/components/database/build.xml =================================================================== --- trunk/core/components/database/build.xml 2007-01-31 17:32:14 UTC (rev 3852) +++ trunk/core/components/database/build.xml 2007-01-31 17:32:34 UTC (rev 3853) @@ -3,7 +3,7 @@ xmlns:sf="antlib:org.smartfrog.tools.ant"> <!-- - /** (C) Copyright 2005 Hewlett-Packard Development Company, LP + /** (C) Copyright 2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -49,25 +49,10 @@ <!----> <target name="default" depends="published" /> - - <!-- ========================================================== --> - <!-- ========================================================== --> -<!-- - <target name="init" - depends="init-standard-output-dirs,use-smartfrog-tasks,use-smartfrog-testharness"> - </target> ---> <target name="init" depends="core.init"> <echo message="==================================================================="/> <echo message="= ${ant.project.name}"/> </target> - <target name="failure" depends="extended-smartfrog-tasks"> - <sf:unknown /> - </target> - - <target name="failure2" > - <unknown /> - </target> </project> Modified: trunk/core/components/junit/build.xml =================================================================== --- trunk/core/components/junit/build.xml 2007-01-31 17:32:14 UTC (rev 3852) +++ trunk/core/components/junit/build.xml 2007-01-31 17:32:34 UTC (rev 3853) @@ -1,8 +1,8 @@ <?xml version="1.0"?> -<project name="junit" default="default"> +<project name="junit" default="default" xmlns:sf="antlib:org.smartfrog.tools.ant"> <!-- - /** (C) Copyright 1998-2004 Hewlett-Packard Development Company, LP + /** (C) Copyright 2006-2007 Hewlett-Packard Development Company, LP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -24,183 +24,38 @@ --> <description> - Build file for the JUnit tests. + Build file for the JUnit tests. </description> - <!--we are a component --> - <property name="is.component" value="true"/> - <property name="ivy.enabled" value="true"/> - <!--java 1.5--> - <property name="javac.java.version" value="1.5" /> + <!-- override point --> <property file="build.properties"/> + <property name="javac.java.version" value="1.5"/> + <property name="is.component" value="true"/> + <property name="system.tests.enabled" value="true"/> - <property name="root.dir" location="../.."/> - <!-- Import common stuff --> - <import file="../../common.xml"/> - - - <!-- ========================================================== --> - <!-- ========================================================== --> - <target name="init" - depends="common.init,use-smartfrog-tasks,use-smartfrog-testharness"> + <property name="antbuild.dir" location="${root.dir}/antbuild"/> + <property name="xml.dir" location="${antbuild.dir}/xml"/> - <property name="deploy.sf" value="files/success.sf"/> - <property name="default.ini" location="test/files/default.ini"/> - <property name="default.sf" location="test/files/default.sf"/> - <echo message="==================================================================="/> - <echo message="= ${ant.project.name}"/> - </target> - <!-- ========================================================== --> - <!-- create a distro. - we want both sf-junit and the test har --> - <!-- ========================================================== --> - <!--target name="dist" depends="package,package-tests"--> - <target name="dist" depends="package" - description="create a distribution"> + <!-- Import common stuff --> + <import file="${xml.dir}/gui.xml"/> + <import file="${xml.dir}/ivy-mixin.xml"/> + <import file="${xml.dir}/dist.xml"/> + <import file="${xml.dir}/systemtest.xml"/> + <import file="${xml.dir}/state.xml"/> - </target> - - <target name="dist-tests" depends="package,package-tests" - description="create a distribution including SF tests"> + <!----> + <target name="default" depends="published"/> - </target> - - - <!-- ========================================================== --> - <!-- parse the file --> - <!-- ========================================================== --> - <target name="parse" depends="init,dist,init-codebase" - description="parse the deployment descriptor"> - <property name="parse.quiet" value="true"/> - <sf-parse quiet="${parse.quiet}"> - <classpath path="${target.jar}:${test.jar}"/> - <sysproperty key="org.smartfrog.codebase" - value="${codebase}"/> - <!-- source files --> - <source dir="${src.dir}" - includes="org/smartfrog/services/junit/example.sf"> - </source> - <!-- test files --> - <source dir="${test.src.dir}"> - <include name="files/*.sf"/> - <exclude name="files/components.sf"/> - </source> - </sf-parse> - </target> - - <!-- ========================================================== --> - <!-- set up any properties for deployment --> - <!-- ========================================================== --> - <target name="init-deploy-properties" depends="init"> - <property name="deploy.host" value="localhost"/> - <property name="application.name" value="${project.name}"/> + <target name="init" depends="core.init"> + <echo message="==================================================================="/> + <echo message="= ${ant.project.name}"/> </target> - <!-- ========================================================== --> - <!-- set--> - <!-- ========================================================== --> - <target name="init-codebase" depends="init-deploy-properties,declare-classpaths,package-tests" - description="deploy"> - <sf-tourl property="codebase"> - <path refid="tests.run.classpath" /> - </sf-tourl> - <echo> -deploying to ${deploy.host} -codebase=${codebase} - </echo> - </target> - <!-- ========================================================== --> - <!-- deploy; requires a host --> - <!-- ========================================================== --> - <target name="deploy" depends="parse,init-codebase,init-deploy-properties" - description="deploy"> - <sf-deploy classpathref="run.classpath" - logStackTraces="true" - host="${deploy.host}" - timeout="30000" - > - <codebase url="${codebase}"/> - <application name="${application.name}"> - #include "/${deploy.sf}" - sfCodeBase PROPERTY org.smartfrog.codebase; - </application> - </sf-deploy> - </target> - <target name="undeploy" depends="init-deploy-properties" - description="deploy"> - - <sf-undeploy classpathref="run.classpath" - logStackTraces="true" - host="${deploy.host}" - timeout="30000" - application="${application.name}"/> - </target> - - - <!-- ========================================================== --> - <!-- system tests --> - <!-- ========================================================== --> - <target name="system-tests" depends="parse,package,package-tests,init-codebase" - description="run system tests" - if="system.tests.enabled"> - <parallel> - - <!-- first thread runs the daemon --> - <sequential> - <antcall target="start-daemon-if-needed"/> - </sequential> - - <!-- this is the next thread --> - <sequential> - - <!-- - wait ten seconds for the harness to start - without this the first tests will fail as there is no - sf daemon around - --> - <sf-waitfordaemon maxwait="10" timeoutproperty="daemon.missing"/> - <fail if="daemon.missing">No daemon</fail> - <sf-junit - errorProperty="test.failed" - failureProperty="test.failed" - > - <classpath> - <path refid="tests.run.classpath"/> - <pathelement location="${test.classes.dir}"/> - </classpath> - <sysproperty key="org.smartfrog.codebase" value="${codebase}"/> - <syspropertyset> - <propertyref prefix="runtime"/> - </syspropertyset> - - <!-- #Test case isolation technique --> - <test name="${testcase}" if="testcase"/> - <batchtest todir="${test.data.dir}" unless="testcase"> - <!-- bulk test case --> - <fileset dir="${test.classes.dir}"> - <include name="org/smartfrog/services/junit/test/system/**/*Test.class"/> - </fileset> - </batchtest> - </sf-junit> - - <!-- conditionally stop the daemon --> - <antcall target="conditional-daemon-exit"/> - <!-- end the test thread --> - </sequential> - </parallel> - </target> - - <target name="conditional-daemon-exit" unless="no.stop.daemon"> - <antcall target="stop-daemon-if-started"/> - </target> - - - <target name="all" depends="m2-install,test" /> </project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |