Fix code that outputs the usage information following a command
[jnode-mirror.git] / shell / build-tests.xml
blobe3c1eceb275f513e53e0b42306c8f7c32117d177
1 <project name="JNode-Shell-Tests" default="all" basedir=".">
3         <import file="${basedir}/../all/build.xml"/>
5         <target name="help" description="output target descriptions">
6                 <echo>
7 The main targets (tests) for this build are as follows:
8 all          Runs all tests for this project
9 all-blackbox Runs all blackbox tests for this project
10 all-junit    Runs all JUnit tests for this project
11 bjorne       Runs the bjorne interpreter blackbox-tests
12 help         Output these messages
13                 </echo>
14         </target>
15         
16         <!-- FIXME - I think that we need some 'Ant magic' for running blackbox tests.
17              For a start, we need to be able to set the blackbox options (-E, -F, -v, -d, etc) 
18              once in an Ant property. -->
20         <target name="bjorne">
21                 <java classpathref="cp-test" classname="org.jnode.test.shell.harness.TestHarness">
22                         <arg value="-E"/>
23                         <arg value="-v"/>
24                         <arg value="-s"/>
25                         <arg value="${root.dir}"/>
26                         <arg value="${basedir}/src/test/org/jnode/test/shell/bjorne/bjorne-shell-tests.xml"/>
27                 </java>
28                 <java classpathref="cp-test" classname="org.jnode.test.shell.harness.TestHarness">
29                         <arg value="-E"/>
30                         <arg value="-v"/>
31                         <arg value="-s"/>
32                         <arg value="${root.dir}"/>
33                         <arg value="${basedir}/src/test/org/jnode/test/shell/bjorne/bjorne-builtin-tests.xml"/>
34                 </java>
35         </target>
37         <target name="all-blackbox">
38                 <java classpathref="cp-test" classname="org.jnode.test.shell.harness.TestHarness">
39                         <arg value="-E" />
40                         <arg value="-v"/>
41                         <arg value="-s" />
42                         <arg value="${root.dir}" />
43                         <arg value="${basedir}/src/test/org/jnode/test/shell/all-tests.xml" />
44                 </java>
45         </target>
47         <target name="all-junit">
48                 <junit showoutput="on" printsummary="on" fork="on">
49                         <classpath refid="cp-test"/>
50                         <batchtest fork="yes">
51                                 <fileset dir="${basedir}/src/test">
52                                         <include name="**/*Test.java" />
53                                         <!-- 
54                                                 FIXME - Some of the unit tests may need to be excluded if they cannot be 
55                                             made to run in classic Java from the sandbox command line.
56                                          -->
57                                 </fileset>
58                         </batchtest>
59                 </junit>
60         </target>
62         <target name="all" depends="all-junit,all-blackbox" />
64 </project>