Skip to content
Permalink
Browse files
add executable attribute to <nunit>. Fixes Bugzilla Issue 51023.
  • Loading branch information
bodewig committed Nov 16, 2014
1 parent bcb2e5b commit 0e38fd1576803303c388a9eff9f92890c82e5f88
Showing 3 changed files with 32 additions and 2 deletions.
@@ -43,6 +43,10 @@
on non-Windows systems. The executable attribute of the task
can still be used to select the compiler explicitly.
</action>
<action type="add" issue="51023">
The &lt;nunit&gt; task has a new executable attribute that can
be used to override the name of the NUnit executable.
</action>
</release>

<release version="1.1" date="2011-02-04">
@@ -45,6 +45,11 @@ <h3>Parameters</h3>
Specify the framework to use.</td>
<td align="center">No.</td>
</tr>
<tr>
<td valign="top">executable</td>
<td valign="top">NUnit executable to use. <em>since 1.2</em></td>
<td align="center">No. Defaults to <code>nunit-console.exe</code></td>
</tr>
<tr>
<td valign="top">config</td>
<td valign="top">Config file to use</td>
@@ -117,13 +117,19 @@ public class NUnitTask extends Task {
*/
private String errorProperty;

/**
* executable
*/
private String executable;

/**
* Support for nested environment variables.
*/
private Environment env = new Environment();

public NUnitTask() {
super();
executable = "nunit-console.exe";
}

/**
@@ -214,6 +220,21 @@ public void setErrorProperty(String name) {
errorProperty = name;
}

/**
* set the name of the program, overriding the defaults.
*
* <p>Can be used to set the full path to a program, or to switch
* to an alternate implementation of the command - e.g. using
* "nunit-console-x86.exe" to run the 32bit version on a 64bit
* system.</p>
*
* @param executable
* @since .NET Antlib 1.2
*/
public void setExecutable(String executable) {
this.executable = executable;
}

/**
* Adds a test assembly by name.
*/
@@ -266,7 +287,7 @@ public void execute() {
}

DotNetExecTask exec = DotNetExecTask.getTask(this, vm,
"nunit-console.exe",
executable,
env);
Iterator iter = testAssemblies.iterator();
while (iter.hasNext()) {
@@ -332,4 +353,4 @@ public static class NamedElement {
public void setName(String s) {name = s;}
public String toString() {return getName();}
}
}
}

0 comments on commit 0e38fd1

Please sign in to comment.