Author: brett
Date: Fri Aug 22 11:56:22 2014
New Revision: 1619763
URL: http://svn.apache.org/r1619763
Log:
fix NUnit on Mono
There is no nunit-console-x86, so ignore the forceX86 flag
Modified:
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/resources/META-INF/npanday/executable-plugins.xml
Modified:
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java?rev=1619763&r1=1619762&r2=1619763&view=diff
==============================================================================
---
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java
(original)
+++
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/java/npanday/plugin/test/TesterMojo.java
Fri Aug 22 11:56:22 2014
@@ -35,6 +35,9 @@ import npanday.resolver.filter.DotnetSym
import npanday.resolver.filter.OrArtifactFilter;
import npanday.vendor.SettingsUtil;
import npanday.vendor.StateMachineProcessor;
+import npanday.vendor.Vendor;
+import npanday.vendor.VendorInfo;
+import npanday.vendor.VendorRequirement;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.resolver.ArtifactResolutionException;
import org.apache.maven.artifact.resolver.filter.AndArtifactFilter;
@@ -307,15 +310,38 @@ public class TesterMojo
// pretty print nunit logs
getLog().info( System.getProperty( "line.separator" ) );
- String profile = "NUNIT" + (forceX86 ? "-x86" : "");
File executableHome = getExecutableHome();
+ VendorRequirement vendorRequirement = new VendorRequirement( vendor,
vendorVersion, executionFrameworkVersion );
+
+ VendorInfo vendorInfo;
+ try
+ {
+ vendorInfo = processor.process( vendorRequirement );
+ }
+ catch ( npanday.vendor.IllegalStateException e )
+ {
+ throw new MojoExecutionException(
+ "NPANDAY-902-008: Illegal state of vendor info: Message = " +
e.getMessage(), e);
+ }
+ catch ( PlatformUnsupportedException e )
+ {
+ throw new MojoExecutionException(
+ "NPANDAY-902-009: Platform is unsupported: Message = " +
e.getMessage(), e);
+ }
+
+ String profile = "NUNIT";
+ if ( !vendorInfo.getVendor().equals( Vendor.MONO ) && forceX86 )
+ {
+ profile = "NUNIT-x86";
+ }
+
try
{
try
{
NetExecutable executable = netExecutableFactory.getExecutable(
- new ExecutableRequirement( vendor, vendorVersion,
executionFrameworkVersion, profile ), commands,
+ new ExecutableRequirement( vendorRequirement, profile ),
commands,
executableHome
);
Modified:
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/resources/META-INF/npanday/executable-plugins.xml
URL:
http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/maven-test-plugin/src/main/resources/META-INF/npanday/executable-plugins.xml?rev=1619763&r1=1619762&r2=1619763&view=diff
==============================================================================
---
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/resources/META-INF/npanday/executable-plugins.xml
(original)
+++
incubator/npanday/trunk/plugins/maven-test-plugin/src/main/resources/META-INF/npanday/executable-plugins.xml
Fri Aug 22 11:56:22 2014
@@ -124,17 +124,13 @@ under the License.
<executablePlugin>
- <identifier>NUNIT-x86</identifier>
+ <identifier>NUNIT-4.0</identifier>
<pluginClass>npanday.executable.impl.DefaultNetExecutable</pluginClass>
<vendor>MONO</vendor>
- <!-- this does not work with the packaged MONO nunit runners! -->
- <executable>nunit-console-x86</executable>
- <profile>NUNIT-x86</profile>
+ <executable>nunit-console4</executable>
+ <profile>NUNIT</profile>
<frameworkVersions>
<frameworkVersion>4.0</frameworkVersion>
- <frameworkVersion>3.5</frameworkVersion>
- <frameworkVersion>3.0</frameworkVersion>
- <frameworkVersion>2.0.50727</frameworkVersion>
</frameworkVersions>
<platforms>
<platform>