mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Fix Start-PSxUnit
This commit is contained in:
1 parent
8be00f72d9
commit
4d5e7daf28
1 file changed
+8
-3
+8
-3
@@ -335,17 +335,22 @@ function Start-PSxUnit {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($PSCmdlet.MyInvocation.BoundParameters["Verbose"].IsPresent) {
|
||||||
|
$Verbose = "--verbose"
|
||||||
|
}
|
||||||
|
|
||||||
$Content = Split-Path -Parent (Get-PSOutput)
|
$Content = Split-Path -Parent (Get-PSOutput)
|
||||||
$Arguments = "--configuration", "Linux", "-verbose", "-parallel", "none"
|
$BuildArguments = "--configuration", "Linux"
|
||||||
|
$TestAruments = $BuildArguments + @("-parallel", "none")
|
||||||
try {
|
try {
|
||||||
Push-Location $PSScriptRoot/test/csharp
|
Push-Location $PSScriptRoot/test/csharp
|
||||||
# Path manipulation to obtain test project output directory
|
# Path manipulation to obtain test project output directory
|
||||||
$Output = Join-Path $pwd ((Split-Path -Parent (Get-PSOutput)) -replace (New-PSOptions).Top)
|
$Output = Join-Path $pwd ((Split-Path -Parent (Get-PSOutput)) -replace (New-PSOptions).Top)
|
||||||
Write-Host "Output is $Output"
|
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
|
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) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
throw "$LASTEXITCODE xUnit tests failed"
|
throw "$LASTEXITCODE xUnit tests failed"
|
||||||
|
|||||||
Reference in new issue
Block a user