You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2009/07/22 15:38:34 UTC

[jira] Created: (AMQNET-177) NAnt test target not working

NAnt test target not working
----------------------------

                 Key: AMQNET-177
                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ Client
    Affects Versions: 1.1.0
            Reporter: Timothy Bish
            Assignee: Jim Gomes
            Priority: Minor
             Fix For: 1.2.0


The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails

The problem is the options passed to the nunit-console:

{noformat}
  <target name="test-frameworks">
    <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
      <call target="init" />
	  <if test="${not build.skip}">
	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
	      <arg value="${NUnit.Projectfile}"/>
	      <arg value="/labels"/>
	      <arg value="/xml=Nunit.TestOutput.xml"/>
	    </exec>
	  </if>
    </foreach>
  </target>

{noformat}

According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:

{noformat}
  <target name="test-frameworks">
    <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
      <call target="init" />
	  <if test="${not build.skip}">
	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
	      <arg value="${NUnit.Projectfile}"/>
	      <arg value="-labels"/>
	      <arg value="-xml=Nunit.TestOutput.xml"/>
	    </exec>
	  </if>
    </foreach>
  </target>
{noformat}

Unfortunately it still doesn't run but gives errors along the lines of:

{noformat}
     [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
     [exec] Unhandled Exception:
     [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
     [exec] 
     [exec] Server stack trace: 
     [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
     [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
     [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
     [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
     [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
     [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
     [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
{noformat}

You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.

Anyone know how to get the nunit-console execution to run in the right working directory?


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-177) NAnt test target not working

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53598#action_53598 ] 

Timothy Bish commented on AMQNET-177:
-------------------------------------

The solution seems to be having the NMSTestSupport class search in the path of the Executing assembly instead of just looking for the file in the current working dir. 

> NAnt test target not working
> ----------------------------
>
>                 Key: AMQNET-177
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails
> The problem is the options passed to the nunit-console:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="/labels"/>
> 	      <arg value="/xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="-labels"/>
> 	      <arg value="-xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> Unfortunately it still doesn't run but gives errors along the lines of:
> {noformat}
>      [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>      [exec] Unhandled Exception:
>      [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
>      [exec] 
>      [exec] Server stack trace: 
>      [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
>      [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
>      [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
>      [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
>      [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
>      [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
>      [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
> {noformat}
> You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.
> Anyone know how to get the nunit-console execution to run in the right working directory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-177) NAnt test target not working

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53667#action_53667 ] 

Timothy Bish commented on AMQNET-177:
-------------------------------------

The issue seems to be that the NUnit tools included in Mono itself are broken, if you keep the NUnit 2.4.8 install bin dir ahead of Mono's bin dir on path than you can run the tests using the default nunit-console exe.

> NAnt test target not working
> ----------------------------
>
>                 Key: AMQNET-177
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails
> The problem is the options passed to the nunit-console:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="/labels"/>
> 	      <arg value="/xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="-labels"/>
> 	      <arg value="-xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> Unfortunately it still doesn't run but gives errors along the lines of:
> {noformat}
>      [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>      [exec] Unhandled Exception:
>      [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
>      [exec] 
>      [exec] Server stack trace: 
>      [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
>      [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
>      [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
>      [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
>      [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
>      [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
>      [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
> {noformat}
> You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.
> Anyone know how to get the nunit-console execution to run in the right working directory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQNET-177) NAnt test target not working

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQNET-177.
---------------------------------

    Resolution: Fixed

Minor tweaks to the build scripts to return to calling nunit-console.  

> NAnt test target not working
> ----------------------------
>
>                 Key: AMQNET-177
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails
> The problem is the options passed to the nunit-console:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="/labels"/>
> 	      <arg value="/xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="-labels"/>
> 	      <arg value="-xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> Unfortunately it still doesn't run but gives errors along the lines of:
> {noformat}
>      [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>      [exec] Unhandled Exception:
>      [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
>      [exec] 
>      [exec] Server stack trace: 
>      [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
>      [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
>      [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
>      [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
>      [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
>      [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
>      [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
> {noformat}
> You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.
> Anyone know how to get the nunit-console execution to run in the right working directory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQNET-177) NAnt test target not working

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQNET-177:
-----------------------------------

    Assignee: Timothy Bish  (was: Jim Gomes)

> NAnt test target not working
> ----------------------------
>
>                 Key: AMQNET-177
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails
> The problem is the options passed to the nunit-console:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="/labels"/>
> 	      <arg value="/xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="-labels"/>
> 	      <arg value="-xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> Unfortunately it still doesn't run but gives errors along the lines of:
> {noformat}
>      [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>      [exec] Unhandled Exception:
>      [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
>      [exec] 
>      [exec] Server stack trace: 
>      [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
>      [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
>      [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
>      [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
>      [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
>      [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
>      [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
> {noformat}
> You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.
> Anyone know how to get the nunit-console execution to run in the right working directory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-177) NAnt test target not working

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53599#action_53599 ] 

Timothy Bish commented on AMQNET-177:
-------------------------------------

The last remaining problem is that the nunit-console doesn't seem to add the nunit-framewrok-extensions.dll in so none of the tests with the rowtest attribute seem to want to run from the console.

> NAnt test target not working
> ----------------------------
>
>                 Key: AMQNET-177
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-177
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>            Reporter: Timothy Bish
>            Assignee: Timothy Bish
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> The NAnt test target in the nat-common.xml files isn't working. When run from a Linux box the target fails
> The problem is the options passed to the nunit-console:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="/labels"/>
> 	      <arg value="/xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> According to the NUnit console docs on linux the console only accepts hyphens for args, and accept both forms on windows, so the target should be changed to:
> {noformat}
>   <target name="test-frameworks">
>     <foreach item="String" in="${build.framework.strings}" delim="," property="current.build.framework">
>       <call target="init" />
> 	  <if test="${not build.skip}">
> 	    <exec program="nunit-console" failonerror="true" workingdir="build/${current.build.framework}/${current.build.config}">
> 	      <arg value="${NUnit.Projectfile}"/>
> 	      <arg value="-labels"/>
> 	      <arg value="-xml=Nunit.TestOutput.xml"/>
> 	    </exec>
> 	  </if>
>     </foreach>
>   </target>
> {noformat}
> Unfortunately it still doesn't run but gives errors along the lines of:
> {noformat}
>      [exec] ** (/usr/lib64/mono/1.0/nunit-console.exe:31465): WARNING **: The class System.Collections.Generic.Dictionary`2 could not be loaded, used in mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
>      [exec] Unhandled Exception:
>      [exec] System.TypeLoadException: Could not load type 'Apache.NMS.Test.NMSTestSupport' from assembly 'Apache.NMS.Test, Version=1.2.0.1663, Culture=neutral, PublicKeyToken=82756feee3957618'.
>      [exec] 
>      [exec] Server stack trace: 
>      [exec]   at (wrapper managed-to-native) System.MonoType:GetMethodsByName (string,System.Reflection.BindingFlags,bool,System.Type)
>      [exec]   at System.MonoType.GetMethods (BindingFlags bindingAttr) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/class/corlib/System/MonoType.cs:175 
>      [exec]   at NUnit.Core.Reflect.GetMethodWithAttribute (System.Type fixtureType, System.String attributeName, BindingFlags bindingFlags, Boolean inherit) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Reflect.cs:212 
>      [exec]   at NUnit.Core.NUnitFramework.GetFixtureSetUpMethod (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/NUnitFramework.cs:117 
>      [exec]   at NUnit.Core.NUnitTestFixture..ctor (System.Type fixtureType) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/CommonAssemblyInfo.cs:1 
>      [exec]   at NUnit.Core.Builders.NUnitTestFixtureBuilder.MakeSuite (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/NUnitTestFixtureBuilder.cs:32 
>      [exec]   at NUnit.Core.Builders.AbstractFixtureBuilder.BuildFrom (System.Type type) [0x00000] in /builddir/build/BUILD/mono-2.4/mcs/nunit24/NUnitCore/core/Builders/AbstractFixtureBuilder.cs:69 
> {noformat}
> You get different errors on Windows when you run this but they boil down to the same problem, the nunit-console command is running a 1.1 CLR which isn't right, it should be calling nunit-console2 which runs a 2.0 CLR.  Once you make that change then things start to work a bit better.  The tests still fail because it seems that the tests aren't running from the working directory specified so the NMSTestSupport functions can't load the test config file, but at it gets to the point where its actually running the tests.
> Anyone know how to get the nunit-console execution to run in the right working directory?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.