ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet NUnitTaskTest.java
Date Fri, 22 Oct 2004 09:20:21 GMT
bodewig     2004/10/22 02:20:21

  Modified:    proposal/sandbox/dotnet Tag: ANT_16_BRANCH README build.xml
               proposal/sandbox/dotnet/docs Tag: ANT_16_BRANCH index.html
                        msbuild.html nant.html
               proposal/sandbox/dotnet/src/etc/testcases Tag: ANT_16_BRANCH
                        dotnetexec.xml
               proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        Tag: ANT_16_BRANCH AbstractBuildTask.java
                        DotNetExecTask.java antlib.xml
  Added:       proposal/sandbox/dotnet/docs Tag: ANT_16_BRANCH nunit.html
                        wix.html
               proposal/sandbox/dotnet/src/etc/testcases Tag: ANT_16_BRANCH
                        nunit.xml
               proposal/sandbox/dotnet/src/etc/testcases/src Tag:
                        ANT_16_BRANCH fail.cs pass.cs
               proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
                        Tag: ANT_16_BRANCH NUnitTask.java WixTask.java
               proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet
                        Tag: ANT_16_BRANCH NUnitTaskTest.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.2.2.2   +0 -2      ant/proposal/sandbox/dotnet/README
  
  Index: README
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/README,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- README	16 Apr 2004 09:15:31 -0000	1.2.2.1
  +++ README	22 Oct 2004 09:20:20 -0000	1.2.2.2
  @@ -30,8 +30,6 @@
   
   * A <msbuild> task - if only for the fun of having it.
   
  -Mid term goals:
  -
   * A <wix> task.
   
   * A <nunit> task.
  
  
  
  1.2.2.2   +1 -0      ant/proposal/sandbox/dotnet/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/build.xml,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- build.xml	16 Apr 2004 09:15:31 -0000	1.2.2.1
  +++ build.xml	22 Oct 2004 09:20:20 -0000	1.2.2.2
  @@ -71,6 +71,7 @@
         printsummary="false"
         haltonfailure="false"
         failureproperty="tests.failed"
  +      filtertrace="false"
         >
         <classpath>
           <pathelement location="${jarname}"/>
  
  
  
  No                   revision
  No                   revision
  1.2.2.3   +29 -3     ant/proposal/sandbox/dotnet/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/index.html,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- index.html	2 Jul 2004 11:52:18 -0000	1.2.2.2
  +++ index.html	22 Oct 2004 09:20:20 -0000	1.2.2.3
  @@ -10,12 +10,32 @@
       <p>This is a library of Ant tasks that support using .NET
       executables accross different platforms and in particular support
       using common .NET development tools like <a
  -    href="http://nant.sourceforge.net/">NAnt</a> from within Ant.</p>
  +    href="http://nant.sourceforge.net/">NAnt</a> or <a
  +    href="http://www.nunit.org/">NUnit</a> from within Ant.</p>
   
       <h2>Requirements</h2>
   
  -    <p><a href="http://ant.apache.org/bindownload.cgi">Ant 1.6.2</a>
  -    is required.</p>
  +    <p>The current version requires Ant 1.6.2 or later and may even
  +    work better for a CVS build of Ant created from CVS HEAD.</p>
  +
  +    <h2>Where is it?</h2>
  +
  +    <p>The source code for the library currently lives in the
  +    developer sandbox in Ant's CVS - <a
  +    href="http://cvs.apache.org/viewcvs.cgi/ant/proposal/sandbox/dotnet/">http://cvs.apache.org/viewcvs.cgi/ant/proposal/sandbox/dotnet/</a>.
  +    A binary can be found at <a
  +    href="http://cvs.apache.org/~bodewig/dotnet/dotnet.jar">http://cvs.apache.org/~bodewig/dotnet/dotnet.jar</a>.
  +    A zip file containing the docs is also <a
  +    href="http://cvs.apache.org/~bodewig/dotnet/docs.zip">available</a>.</p>
  +
  +    <p>Note that these are temporary locations and may change later.</p>
  +
  +    <h2>Feedback</h2>
  +
  +    <p>Right now direct any feedback either directly to <a
  +    href="mailto:bodewig@apache.org">me</a> or the <a
  +    href="http://ant.apache.org/mail.html#Developer List">Ant
  +    developer list</a>.
   
       <h2>Installation</h2>
   
  @@ -108,6 +128,12 @@
   
         <li><a href="msbuild.html">msbuild</a> - execute the MSBuild build
         tool, untested.</li>
  +
  +      <li><a href="wix.html">wix</a> - execute the WiX toolset, untested.</li>
  +
  +      <li><a href="nunit.html">nunit</a> - execute the
  +      nunit-console.exe <a href="http://www.nunit.org/">NUnit</a>
  +      test runner.</li>
       </ul>
   
       <hr/>
  
  
  
  1.2.2.3   +0 -6      ant/proposal/sandbox/dotnet/docs/msbuild.html
  
  Index: msbuild.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/msbuild.html,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- msbuild.html	2 Jul 2004 11:52:18 -0000	1.2.2.2
  +++ msbuild.html	22 Oct 2004 09:20:20 -0000	1.2.2.3
  @@ -57,12 +57,6 @@
       a build file snippet instead and Ant will wrap the necessary MSBuild
       <code>&lt;Project&gt; around it.</code></p>
   
  -    <p><b>Note:</b> Ant will turn all element and attribute names into
  -    lower case characters, this means that nested build-file snippets
  -    are currently useless since MSBuild seems to be case-sensitive and
  -    the important elements like &lt;Target&gt; and &lt;Task&gt; start
  -    with a capital T.</p>
  -
       <h3>Examples</h3>
   
       <p>Let MSBuild search for a *.proj file in the (Ant) project's base
  
  
  
  1.2.2.2   +0 -4      ant/proposal/sandbox/dotnet/docs/nant.html
  
  Index: nant.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/nant.html,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- nant.html	16 Apr 2004 09:15:31 -0000	1.2.2.1
  +++ nant.html	22 Oct 2004 09:20:20 -0000	1.2.2.2
  @@ -56,10 +56,6 @@
       a build file snippet instead and Ant will wrap the necessary NAnt
       <code>&lt;project&gt; around it.</code></p>
   
  -    <p><b>Note:</b> Ant will turn all element and attribute names into
  -    lower case characters, this causes problems if your NAnt task is
  -    case-sensitive.</p>
  -
       <h3>Examples</h3>
   
       <p>Let NAnt search for a *.build file in the (Ant) project's base
  
  
  
  No                   revision
  
  Index: nant.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/nant.html,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- nant.html	16 Apr 2004 09:15:31 -0000	1.2.2.1
  +++ nant.html	22 Oct 2004 09:20:20 -0000	1.2.2.2
  @@ -56,10 +56,6 @@
       a build file snippet instead and Ant will wrap the necessary NAnt
       <code>&lt;project&gt; around it.</code></p>
   
  -    <p><b>Note:</b> Ant will turn all element and attribute names into
  -    lower case characters, this causes problems if your NAnt task is
  -    case-sensitive.</p>
  -
       <h3>Examples</h3>
   
       <p>Let NAnt search for a *.build file in the (Ant) project's base
  
  
  
  No                   revision
  
  Index: nant.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/nant.html,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- nant.html	16 Apr 2004 09:15:31 -0000	1.2.2.1
  +++ nant.html	22 Oct 2004 09:20:20 -0000	1.2.2.2
  @@ -56,10 +56,6 @@
       a build file snippet instead and Ant will wrap the necessary NAnt
       <code>&lt;project&gt; around it.</code></p>
   
  -    <p><b>Note:</b> Ant will turn all element and attribute names into
  -    lower case characters, this causes problems if your NAnt task is
  -    case-sensitive.</p>
  -
       <h3>Examples</h3>
   
       <p>Let NAnt search for a *.build file in the (Ant) project's base
  
  
  
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/docs/nunit.html
  
  Index: nunit.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/nunit.html,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/docs/wix.html
  
  Index: wix.html
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/docs/wix.html,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  No                   revision
  No                   revision
  1.3.2.2   +3 -2      ant/proposal/sandbox/dotnet/src/etc/testcases/dotnetexec.xml
  
  Index: dotnetexec.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/dotnetexec.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- dotnetexec.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ dotnetexec.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -76,8 +76,9 @@
     <target name="testCSC" depends="validate_csc">
       <csc
         destFile="${testCSC.exe}"
  -      targetType="exe"
  -      />
  +      targetType="exe">
  +      <src dir="${src.dir}" includes="ex*.cs"/>
  +    </csc>
       <available property="app.created" file="${testCSC.exe}"/>
       <fail unless="app.created">No app ${testCSC.exe} created</fail>
       <dn:dotnetexec executable="${testCSC.exe}" failonerror="true" />
  
  
  
  No                   revision
  
  Index: dotnetexec.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/dotnetexec.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- dotnetexec.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ dotnetexec.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -76,8 +76,9 @@
     <target name="testCSC" depends="validate_csc">
       <csc
         destFile="${testCSC.exe}"
  -      targetType="exe"
  -      />
  +      targetType="exe">
  +      <src dir="${src.dir}" includes="ex*.cs"/>
  +    </csc>
       <available property="app.created" file="${testCSC.exe}"/>
       <fail unless="app.created">No app ${testCSC.exe} created</fail>
       <dn:dotnetexec executable="${testCSC.exe}" failonerror="true" />
  
  
  
  No                   revision
  
  Index: dotnetexec.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/dotnetexec.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- dotnetexec.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ dotnetexec.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -76,8 +76,9 @@
     <target name="testCSC" depends="validate_csc">
       <csc
         destFile="${testCSC.exe}"
  -      targetType="exe"
  -      />
  +      targetType="exe">
  +      <src dir="${src.dir}" includes="ex*.cs"/>
  +    </csc>
       <available property="app.created" file="${testCSC.exe}"/>
       <fail unless="app.created">No app ${testCSC.exe} created</fail>
       <dn:dotnetexec executable="${testCSC.exe}" failonerror="true" />
  
  
  
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/etc/testcases/nunit.xml
  
  Index: nunit.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/nunit.xml,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/etc/testcases/src/fail.cs
  
  Index: fail.cs
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/src/fail.cs,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/etc/testcases/src/pass.cs
  
  Index: pass.cs
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/etc/testcases/src/pass.cs,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  No                   revision
  No                   revision
  1.4.2.2   +2 -7      ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java
  
  Index: AbstractBuildTask.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/AbstractBuildTask.java,v
  retrieving revision 1.4.2.1
  retrieving revision 1.4.2.2
  diff -u -r1.4.2.1 -r1.4.2.2
  --- AbstractBuildTask.java	16 Apr 2004 09:15:32 -0000	1.4.2.1
  +++ AbstractBuildTask.java	22 Oct 2004 09:20:20 -0000	1.4.2.2
  @@ -202,13 +202,8 @@
                                        + " same time");
           }
   
  -        DotNetExecTask exec = new DotNetExecTask();
  -        if (vm != null) {
  -            exec.setVm(vm);
  -        }
  -        exec.setProject(getProject());
  -        exec.setExecutable(getExecutable());
  -        exec.setTaskName(getTaskName());
  +        DotNetExecTask exec = DotNetExecTask.getTask(this, vm, 
  +                                                     getExecutable(), null);
           String[] args = getPropertyArguments(properties);
           for (int i = 0; i < args.length; i++) {
               exec.createArg().setValue(args[i]);
  
  
  
  1.3.2.2   +32 -0     ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java
  
  Index: DotNetExecTask.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotNetExecTask.java,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- DotNetExecTask.java	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ DotNetExecTask.java	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -18,8 +18,10 @@
   package org.apache.tools.ant.taskdefs.optional.dotnet;
   
   import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.ExecTask;
   import org.apache.tools.ant.taskdefs.condition.Os;
  +import org.apache.tools.ant.types.Environment;
   
   /**
    * Specialized <exec> that knows how to deal with Mono vs. Microsoft's
  @@ -115,4 +117,34 @@
       protected final static boolean isMono(String vm) {
           return "mono".equals(vm) || "mint".equals(vm);
       }
  +
  +    /**
  +     * Creates an instance of this task based on a different tasks settings.
  +     */
  +    public static DotNetExecTask getTask(Task t, String vm, 
  +                                         String executable,
  +                                         Environment env) {
  +        DotNetExecTask exec = new DotNetExecTask();
  +        if (vm != null) {
  +            exec.setVm(vm);
  +        }
  +        exec.setProject(t.getProject());
  +        exec.setExecutable(executable);
  +        exec.setTaskName(t.getTaskName());
  +        if (env != null) {
  +            String[] environment = env.getVariables();
  +            if (environment != null) {
  +                for (int i = 0; i < environment.length; i++) {
  +                    int idx = environment[i].indexOf("=");
  +                    Environment.Variable v = new Environment.Variable();
  +                    v.setKey(environment[i].substring(0, idx));
  +                    v.setValue(environment[i].substring(idx + 1));
  +                    exec.addEnv(v);
  +                }
  +            }
  +        }
  +        
  +        return exec;
  +    }
  +
   }
  
  
  
  1.3.2.2   +8 -0      ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml
  
  Index: antlib.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- antlib.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ antlib.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -27,4 +27,12 @@
       name="nant"
       classname="org.apache.tools.ant.taskdefs.optional.dotnet.NAntTask"
       />
  +  <taskdef
  +    name="wix"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.WixTask"
  +    />
  +  <taskdef
  +    name="nunit"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.NUnitTask"
  +    />
   </antlib>
  
  
  
  No                   revision
  
  Index: antlib.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- antlib.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ antlib.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -27,4 +27,12 @@
       name="nant"
       classname="org.apache.tools.ant.taskdefs.optional.dotnet.NAntTask"
       />
  +  <taskdef
  +    name="wix"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.WixTask"
  +    />
  +  <taskdef
  +    name="nunit"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.NUnitTask"
  +    />
   </antlib>
  
  
  
  No                   revision
  
  Index: antlib.xml
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/antlib.xml,v
  retrieving revision 1.3.2.1
  retrieving revision 1.3.2.2
  diff -u -r1.3.2.1 -r1.3.2.2
  --- antlib.xml	16 Apr 2004 09:15:32 -0000	1.3.2.1
  +++ antlib.xml	22 Oct 2004 09:20:20 -0000	1.3.2.2
  @@ -27,4 +27,12 @@
       name="nant"
       classname="org.apache.tools.ant.taskdefs.optional.dotnet.NAntTask"
       />
  +  <taskdef
  +    name="wix"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.WixTask"
  +    />
  +  <taskdef
  +    name="nunit"
  +    classname="org.apache.tools.ant.taskdefs.optional.dotnet.NUnitTask"
  +    />
   </antlib>
  
  
  
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTask.java
  
  Index: NUnitTask.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTask.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  
  1.2.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java
  
  Index: WixTask.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/WixTask.java,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  
  
  
  No                   revision
  No                   revision
  1.1.2.1   +0 -0      ant/proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTaskTest.java
  
  Index: NUnitTaskTest.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/sandbox/dotnet/src/testcases/org/apache/tools/ant/taskdefs/optional/dotnet/NUnitTaskTest.java,v
  retrieving revision 1.1
  retrieving revision 1.1.2.1
  diff -u -r1.1 -r1.1.2.1
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message