Tests can be executed
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:51:04 +0200
changeset 1956735848fe6c
parent 18 1e82ffa1391b
child 20 afae7be94b25
Tests can be executed
samples/composition/build.xml
samples/composition/nbproject/project.xml
     1.1 --- a/samples/composition/build.xml	Sat Jun 14 09:51:04 2008 +0200
     1.2 +++ b/samples/composition/build.xml	Sat Jun 14 09:51:04 2008 +0200
     1.3 @@ -16,7 +16,7 @@
     1.4          
     1.5          <antcall target="-build-one">
     1.6              <param name="version" value="test"/>
     1.7 -            <param name="cp" location="build/api1.0/classes"/>
     1.8 +            <param name="cp" value="build/api1.0/classes:../libs/dist/junit-4.1.jar"/>
     1.9          </antcall>
    1.10      </target>
    1.11      
    1.12 @@ -36,9 +36,21 @@
    1.13      
    1.14      <target name="-run-one">
    1.15          <fail message="You need to specify API version number" unless="version"/>
    1.16 -        <java classpath="build/${version}/classes:build/impl/classes" classname="impl.Impl"
    1.17 -            failonerror="true"
    1.18 -        />
    1.19 +        <mkdir dir="build/testresults"/>
    1.20 +        <junit dir="build/test/classes" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
    1.21 +            <batchtest todir="build/testresults">
    1.22 +                <fileset dir="build/test/classes">
    1.23 +                    <filename name="**/*Test.class"/>
    1.24 +                </fileset>
    1.25 +            </batchtest>
    1.26 +            <classpath>
    1.27 +                <path location="build/${version}/classes"/>
    1.28 +                <path location="build/test/classes"/>
    1.29 +                <path location="../libs/dist/junit-4.1.jar"/>
    1.30 +            </classpath>
    1.31 +            <formatter type="brief" usefile="false"/>
    1.32 +            <formatter type="xml"/>
    1.33 +        </junit>
    1.34      </target>
    1.35      
    1.36      <target name="-build-one">
     2.1 --- a/samples/composition/nbproject/project.xml	Sat Jun 14 09:51:04 2008 +0200
     2.2 +++ b/samples/composition/nbproject/project.xml	Sat Jun 14 09:51:04 2008 +0200
     2.3 @@ -81,7 +81,7 @@
     2.4              </compilation-unit>
     2.5              <compilation-unit>
     2.6                  <package-root>src-test</package-root>
     2.7 -                <classpath mode="compile">src-api1.0</classpath>
     2.8 +                <classpath mode="compile">src-api1.0:../libs/dist/junit-4.1.jar</classpath>
     2.9                  <source-level>1.5</source-level>
    2.10              </compilation-unit>
    2.11          </java-data>