Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanz committed Jul 25, 2016
1 parent b27bf34 commit d513b32
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ function Invoke-ExpressionExitCodeCheck([string] $command)
[string] $codeProjectsDirectory = "Source"
[string] $nugetOutputDirectory = "Build"


if ($AppVeyor) {
$netMSpecRunnerExe += " --appveyor"
$netNUnitRunnerExe += " --result=myresults.xml;format=AppVeyor"
}

# Patch version

if ($AppVeyor) {
Expand Down Expand Up @@ -70,6 +64,10 @@ Invoke-ExpressionExitCodeCheck "dotnet build ${codeProjectsDirectory}\Machine.Sp
# Run Mspec tests
Write-Host "Running specs..."

if ($AppVeyor) {
$netMSpecRunnerExe += " --appveyor"
}

[bool] $specsFailed = $false

Get-ChildItem $testProjectsDirectory -Directory -Filter "*.Specs" | ForEach {
Expand All @@ -93,7 +91,10 @@ Get-ChildItem $testProjectsDirectory -Directory -Filter "*.Tests" | ForEach {
Invoke-ExpressionExitCodeCheck "dotnet build $($_.FullName) -c ${configuration}"

Get-Item "$($_.FullName)\bin\${configuration}\*\*.Tests.dll" -ErrorAction Stop | ForEach {
Invoke-Expression "${netNUnitRunnerExe} $($_.FullName)"
$command = "${netNUnitRunnerExe} $($_.FullName)"
if ($AppVeyor) {
$command += " --result=myresults.xml;format=AppVeyor"
}

if (!$testsFailed) {
$testsFailed = $LASTEXITCODE -and $LASTEXITCODE -ne 0
Expand Down

0 comments on commit d513b32

Please sign in to comment.