mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
Add OctokitRT unit tests to the build
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</Target>
|
||||
|
||||
<Target Name="RunRTUnitTests" DependsOnTargets="Build">
|
||||
<xunit Assembly=".\OctokitRT.Tests\bin\$(Configuration)\OctokitRT.Tests.dll" Xml="OctokitRT.Tests.results.xml" />
|
||||
<xunit Assembly=".\Octokit.Tests\bin\$(Configuration)\OctokitRT.Tests.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 "REAL" ACCOUNT)." />
|
||||
</Target>
|
||||
|
||||
<Target Name="FullBuild" DependsOnTargets="RunUnitTests; RunIntegrationTests" />
|
||||
<Target Name="FullBuild" DependsOnTargets="RunUnitTests; RunRTUnitTests; RunIntegrationTests" />
|
||||
</Project>
|
||||
|
||||
@@ -84,14 +84,14 @@ if ($LastExitCode -ne 0) {
|
||||
Die-WithOutput $exitCode $output
|
||||
}
|
||||
|
||||
function Run-XUnit([string]$project, [int]$timeoutDuration) {
|
||||
$dll = "$project\bin\Release\$project.dll"
|
||||
function Run-XUnit([string]$project, [int]$timeoutDuration, [string]$projectFolder = $project) {
|
||||
$dll = "$projectFolder\bin\Release\$project.dll"
|
||||
|
||||
$xunitDirectory = Join-Path $rootDirectory tools\xunit
|
||||
$consoleRunner = Join-Path $xunitDirectory xunit.console.clr4.x86.exe
|
||||
$xml = Join-Path $rootDirectory "nunit-$project.xml"
|
||||
|
||||
$output=(& $consoleRunner $dll /nunit $xml /silent /noshadow)
|
||||
$output=(& $consoleRunner $dll /nunit $xml /silent /noshadow)
|
||||
|
||||
$result = New-Object System.Object
|
||||
$result | Add-Member -Type NoteProperty -Name Output -Value $output
|
||||
@@ -112,6 +112,17 @@ if ($result.ExitCode -eq 0) {
|
||||
}
|
||||
Write-Output ""
|
||||
|
||||
Write-Output "Running OctokitRT.Tests..."
|
||||
$result = Run-XUnit OctokitRT.Tests 120 Octokit.Tests
|
||||
if ($result.ExitCode -eq 0) {
|
||||
# Print out the test result summary.
|
||||
Write-Output $result.Output[-1]
|
||||
} else {
|
||||
$exitCode = $result.ExitCode
|
||||
Write-Output $result.Output
|
||||
}
|
||||
Write-Output ""
|
||||
|
||||
Write-Output "Running Octokit.Tests.Integration..."
|
||||
$result = Run-XUnit Octokit.Tests.Integration 180
|
||||
if ($result.ExitCode -eq 0) {
|
||||
|
||||
Reference in New Issue
Block a user