mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Add more debugging to try to determine why these test fail in release build. (#19829)
This commit is contained in:
1 parent
6a10e8cca1
commit
ee13bb9f05
1 file changed
+24
-2
@@ -22,12 +22,34 @@ Describe "PackageManagement Acceptance Test" -Tags "Feature" {
|
||||
# register the asset directory
|
||||
$localSourceName = [Guid]::NewGuid().ToString("n")
|
||||
$localSourceLocation = Join-Path $PSScriptRoot assets
|
||||
$newSourceResult = Register-PackageSource -Name $localSourceName -provider NuGet -Location $localSourceLocation -Force -Trusted
|
||||
$newSourceResult = Register-PackageSource -Name $localSourceName -provider NuGet -Location $localSourceLocation -Force -Trusted -Verbose
|
||||
Write-Verbose -Verbose -Message "Register-PackageSource -Name $localSourceName -provider NuGet -Location $localSourceLocation -Force -Trusted"
|
||||
$newSourceResult | Out-String -Stream | Write-Verbose -Verbose
|
||||
$localSourceCheck = Get-PackageSource -Name $localSourceName -ErrorAction Ignore
|
||||
|
||||
$skipPackageTests = $false
|
||||
if ($newSourceResult.Location -ne $localSourceLocation) {
|
||||
# It is possible that Register-PackageSource appears to succeed but the source is not actually registered
|
||||
# collect as much information as possible to help diagnose the problem
|
||||
if (($newSourceResult.Location -ne $localSourceLocation) -or ($localSourceCheck.Location -ne $localSourceLocation)) {
|
||||
Write-Verbose -Verbose "Skipping tests because local source could not be correctly created"
|
||||
if ( $newSourceResult ) {
|
||||
$newSourceResult | out-string -str | Write-Verbose -Verbose
|
||||
}
|
||||
else {
|
||||
Write-Verbose "newSourceResult is null"
|
||||
}
|
||||
|
||||
if ( $localSourceCheck ) {
|
||||
$localSourceCheck | out-string -str | Write-Verbose -Verbose
|
||||
}
|
||||
else {
|
||||
Write-Verbose "LocalSourceCheck is null"
|
||||
}
|
||||
|
||||
if (-not $IsWindows) {
|
||||
Get-ChildItem "$HOME/.config" -Recurse -File | out-string -str | Write-Verbose -Verbose
|
||||
}
|
||||
|
||||
$skipPackageTests = $true
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user