Fix the CI build

A recent change renamed the NetCore Octokit assembly to Octokit.dll.
Since both our test projects are in the same directory, one will cause
the NetCore Octokit.dll to overwrite the Net45 Octokit.dll. This commit
makes sure the unit tests compile to different directories.
This commit is contained in:
Haacked
2013-10-31 16:13:15 -07:00
parent dfb2790d46
commit 818593bf3f
9 changed files with 23 additions and 23 deletions

View File

@@ -18,7 +18,7 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<IntermediateOutputPath>obj\Debug\Net40</IntermediateOutputPath>
<OutputPath>bin\Debug\Net40</OutputPath>
<OutputPath>bin\Debug\Net45\</OutputPath>
<DefineConstants>DEBUG;TRACE;CODE_ANALYSIS;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -31,7 +31,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<IntermediateOutputPath>obj\Release\Net40</IntermediateOutputPath>
<OutputPath>bin\Release\Net40</OutputPath>
<OutputPath>bin\Release\Net45\</OutputPath>
<DefineConstants>TRACE;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -24,7 +24,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release\Net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\Debug\NetCore45\</OutputPath>
<DefineConstants>TRACE;DEBUG;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -24,7 +24,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release\NetCore45\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -16,7 +16,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>bin\Debug\Net45\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -24,7 +24,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>bin\Release\Net45\</OutputPath>
<DefineConstants>TRACE;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>

View File

@@ -14,11 +14,11 @@
</Target>
<Target Name="RunUnitTests" DependsOnTargets="Build">
<xunit Assembly=".\Octokit.Tests\bin\$(Configuration)\Octokit.Tests.dll" Xml="Octokit.Tests.results.xml" />
<xunit Assembly=".\Octokit.Tests\bin\$(Configuration)\Net45\Octokit.Tests.dll" Xml="Octokit.Tests.results.xml" />
</Target>
<Target Name="RunRTUnitTests" DependsOnTargets="Build">
<xunit Assembly=".\Octokit.Tests\bin\$(Configuration)\OctokitRT.Tests.dll" Xml="OctokitRT.Tests.results.xml" />
<Target Name="RunNetCoreUnitTests" DependsOnTargets="Build">
<xunit Assembly=".\Octokit.Tests\bin\$(Configuration)\NetCore45\Octokit.Tests-NetCore45.dll" Xml="OctokitRT.Tests.results.xml" />
</Target>
<Target Name="RunIntegrationTests" DependsOnTargets="Build; DoNotSkipIntegrationTests; SkipIntegrationTests" />
@@ -31,5 +31,5 @@
<Warning Text ="The integration tests were skipped because the OCTOKIT_GITHUBUSERNAME and OCTOKIT_GITHUBUSERNAME environment variables are not set. Please configure these environment variables for a GitHub test account (DO NOT USE A &quot;REAL&quot; ACCOUNT)." />
</Target>
<Target Name="FullBuild" DependsOnTargets="RunUnitTests; RunRTUnitTests; RunIntegrationTests" />
<Target Name="FullBuild" DependsOnTargets="RunUnitTests; RunNetCoreUnitTests; RunIntegrationTests" />
</Project>

View File

@@ -29,7 +29,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<IntermediateOutputPath>obj\Release\NetCore45</IntermediateOutputPath>
<OutputPath>bin\Release\NetCore45</OutputPath>
<OutputPath>bin\Release\NetCore45\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -180,4 +180,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -32,7 +32,7 @@
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<IntermediateOutputPath>obj\Release\Net45</IntermediateOutputPath>
<OutputPath>bin\Release\Net45</OutputPath>
<OutputPath>bin\Release\Net45\</OutputPath>
<DefineConstants>TRACE;CODE_ANALYSIS;CODE_ANALYSIS;SIMPLE_JSON_OBJARRAYINTERNAL;SIMPLE_JSON_INTERNAL;NET_45</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -210,4 +210,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@@ -14,8 +14,8 @@ if not exist packaging\octokit\lib\netcore45 mkdir packaging\octokit\lib\netcore
copy LICENSE.txt packaging\octokit\
copy README.md packaging\octokit\
copy Octokit\bin\Release\Octokit.dll packaging\octokit\lib\net45\
copy Octokit\bin\WinRT\Release\OctokitRT.dll packaging\octokit\lib\netcore45\
copy Octokit\bin\%config%\Net45\Octokit.dll packaging\octokit\lib\net45\
copy Octokit\bin\%config%\NetCore45\Octokit.dll packaging\octokit\lib\netcore45\
tools\nuget\nuget.exe pack "octokit.nuspec" -BasePath packaging\octokit -Output packaging

View File

@@ -84,8 +84,8 @@ if ($LastExitCode -ne 0) {
Die-WithOutput $exitCode $output
}
function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$projectFolder = $project) {
$dll = "$projectFolder\bin\Release\$project.dll"
function Run-XUnit([string]$platform, [string]$project, [int]$timeoutDuration, [string]$projectFolder = $project) {
$dll = "$projectFolder\bin\Release\$platform\$project.dll"
$xunitDirectory = Join-Path $rootDirectory tools\xunit
$consoleRunner = Join-Path $xunitDirectory xunit.console.clr4.x86.exe
@@ -102,7 +102,7 @@ function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$projectFold
$exitCode = 0
Write-Output "Running Octokit.Tests..."
$result = Run-XUnit Octokit.Tests 120
$result = Run-XUnit Net45 Octokit.Tests 120
if ($result.ExitCode -eq 0) {
# Print out the test result summary.
Write-Output $result.Output[-1]
@@ -112,8 +112,8 @@ if ($result.ExitCode -eq 0) {
}
Write-Output ""
Write-Output "Running OctokitRT.Tests..."
$result = Run-XUnit OctokitRT.Tests 120 Octokit.Tests
Write-Output "Running Octokit.Tests-NetCore45..."
$result = Run-XUnit NetCore45 Octokit.Tests-NetCore45 120 Octokit.Tests
if ($result.ExitCode -eq 0) {
# Print out the test result summary.
Write-Output $result.Output[-1]
@@ -124,7 +124,7 @@ if ($result.ExitCode -eq 0) {
Write-Output ""
Write-Output "Running Octokit.Tests.Integration..."
$result = Run-XUnit Octokit.Tests.Integration 180
$result = Run-XUnit Net45 Octokit.Tests.Integration 180
if ($result.ExitCode -eq 0) {
# Print out the test result summary.
Write-Output $result.Output[-1]