mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-18 09:44:20 +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 -->
|
||||
|
||||
<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">
|
||||
|
Reference in New Issue
Block a user