Add OctokitRT unit tests to the build

This commit is contained in:
Haacked
2013-10-04 10:13:57 -07:00
parent f6c156f371
commit 5d15d34c31
2 changed files with 16 additions and 5 deletions

View File

@@ -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) {