Fix 32-bit vs 64-bit unit tests

Always run 32-bit version of nunit console runner.

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-07-12 20:17:35 -07:00
parent 6d082f2ce3
commit 55d9cad635

View File

@@ -62,27 +62,25 @@
<!-- Testing -->
<Target Name ="Test">
<PropertyGroup>
<UseSqlite64 Condition="'$(teamcity_version)'=='' And '$(BuildPlatform)' == 'x64'">True</UseSqlite64>
</PropertyGroup>
<!-- We only support running test in 32-bit environement for now (because of SQLite) -->
<!-- Copy nunit to a temporaty directory and rename nunit-console-x86 -->
<ItemGroup>
<Test-NUnit-Include Include="$(LibFolder)\nunit\**\*" />
</ItemGroup>
<Message Condition="'$(UseSqlite64)' == 'True'" Text="Testing with x64 version of Sqlite"/>
<Copy
SourceFiles="@(Test-NUnit-Include)"
DestinationFolder="$(BuildFolder)\Test\nunit" />
<Copy
SourceFiles="$(BuildFolder)\Test\nunit\nunit-console-x86.exe"
DestinationFiles="$(BuildFolder)\Test\nunit\nunit-console.exe" />
<CreateItem Include="$(CompileFolder)\*.Tests.*dll">
<Output TaskParameter="Include" ItemName="TestAssemblies" />
</CreateItem>
<!-- use x64 sqlite for tests depending on build platform -->
<Copy Condition="'$(UseSqlite64)' == 'True'"
SourceFiles="$(LibFolder)\sqlite\x64\System.Data.SQLite.dll"
DestinationFiles="$(CompileFolder)\System.Data.SQLite.dll" />
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
<!-- restore sqlite version if needed -->
<Copy Condition="'$(UseSqlite64)' == 'True'"
SourceFiles="$(LibFolder)\sqlite\System.Data.SQLite.dll"
DestinationFiles="$(CompileFolder)\System.Data.SQLite.dll" />
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(BuildFolder)\Test\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
</Target>
<Target Name ="Spec">