mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
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:
28
Orchard.proj
28
Orchard.proj
@@ -62,27 +62,25 @@
|
|||||||
<!-- Testing -->
|
<!-- Testing -->
|
||||||
|
|
||||||
<Target Name ="Test">
|
<Target Name ="Test">
|
||||||
<PropertyGroup>
|
<!-- We only support running test in 32-bit environement for now (because of SQLite) -->
|
||||||
<UseSqlite64 Condition="'$(teamcity_version)'=='' And '$(BuildPlatform)' == 'x64'">True</UseSqlite64>
|
<!-- Copy nunit to a temporaty directory and rename nunit-console-x86 -->
|
||||||
</PropertyGroup>
|
<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">
|
<CreateItem Include="$(CompileFolder)\*.Tests.*dll">
|
||||||
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
<Output TaskParameter="Include" ItemName="TestAssemblies" />
|
||||||
</CreateItem>
|
</CreateItem>
|
||||||
|
|
||||||
<!-- use x64 sqlite for tests depending on build platform -->
|
<NUnit Assemblies="@(TestAssemblies)" ToolPath="$(BuildFolder)\Test\nunit" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Tests.xml" />
|
||||||
<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" />
|
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name ="Spec">
|
<Target Name ="Spec">
|
||||||
|
|||||||
Reference in New Issue
Block a user