From 4d5e7daf288460d0693ea0dd9b8e5287d0b5fb09 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 31 May 2016 16:06:19 -0700 Subject: [PATCH] Fix Start-PSxUnit --- build.psm1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index a845c91cef..b075b1d770 100644 --- a/build.psm1 +++ b/build.psm1 @@ -335,17 +335,22 @@ function Start-PSxUnit { return } + if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) { + $Verbose = "--verbose" + } + $Content = Split-Path -Parent (Get-PSOutput) - $Arguments = "--configuration", "Linux", "-verbose", "-parallel", "none" + $BuildArguments = "--configuration", "Linux" + $TestAruments = $BuildArguments + @("-parallel", "none") try { Push-Location $PSScriptRoot/test/csharp # Path manipulation to obtain test project output directory $Output = Join-Path $pwd ((Split-Path -Parent (Get-PSOutput)) -replace (New-PSOptions).Top) Write-Host "Output is $Output" - Start-NativeExecution { dotnet build $Arguments } + Start-NativeExecution { dotnet $Verbose build $BuildArguments } Copy-Item -ErrorAction SilentlyContinue -Recurse -Path $Content/* -Include Modules,libpsl-native* -Destination $Output - Start-NativeExecution { dotnet test $Arguments } + Start-NativeExecution { dotnet $Verbose test $TestArguments } if ($LASTEXITCODE -ne 0) { throw "$LASTEXITCODE xUnit tests failed"