From 5d15d34c31780ae812af476e9aefbdad428e2f09 Mon Sep 17 00:00:00 2001 From: Haacked Date: Fri, 4 Oct 2013 10:13:57 -0700 Subject: [PATCH] Add OctokitRT unit tests to the build --- Octokit.msbuild | 4 ++-- script/cibuild.ps1 | 17 ++++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Octokit.msbuild b/Octokit.msbuild index fc9fcfdb..f6bd6b8f 100644 --- a/Octokit.msbuild +++ b/Octokit.msbuild @@ -18,7 +18,7 @@ - + @@ -31,5 +31,5 @@ - + diff --git a/script/cibuild.ps1 b/script/cibuild.ps1 index 15b50815..bb26e07e 100644 --- a/script/cibuild.ps1 +++ b/script/cibuild.ps1 @@ -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) {