Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1602,14 +1602,14 @@ function Show-PSPesterError
$description = $testFailure.description
$name = $testFailure.name
$message = $testFailure.failure.message
$StackTrace = $testFailure.failure."stack-trace"
$stack_trace = $testFailure.failure."stack-trace"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to fix a warning from PSSA -- $StackTrace is a built-in variable, so should use a different name.

}
elseif ($PSCmdlet.ParameterSetName -eq 'object')
{
$description = $testFailureObject.Describe + '/' + $testFailureObject.Context
$name = $testFailureObject.Name
$message = $testFailureObject.FailureMessage
$StackTrace = $testFailureObject.StackTrace
$stack_trace = $testFailureObject.StackTrace
}
else
{
Expand All @@ -1621,7 +1621,7 @@ function Show-PSPesterError
Write-Log -isError -message "message:"
Write-Log -isError -message $message
Write-Log -isError -message "stack-trace:"
Write-Log -isError -message $StackTrace
Write-Log -isError -message $stack_trace

}

Expand Down Expand Up @@ -1659,14 +1659,14 @@ function Test-XUnitTestResults
$description = $failure.type
$name = $failure.method
$message = $failure.failure.message
$StackTrace = $failure.failure.'stack-trace'
$stack_trace = $failure.failure.'stack-trace'

Write-Log -isError -message ("Description: " + $description)
Write-Log -isError -message ("Name: " + $name)
Write-Log -isError -message "message:"
Write-Log -isError -message $message
Write-Log -isError -message "stack-trace:"
Write-Log -isError -message $StackTrace
Write-Log -isError -message $stack_trace
Write-Log -isError -message " "
}

Expand Down Expand Up @@ -2846,7 +2846,6 @@ assembly
# only create an assembly group if we have tests
if ( $tCases.count -eq 0 -and ! $includeEmpty ) { continue }
$tGroup = $tCases | Group-Object result
$total = $tCases.Count

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for fixing a PSSA warning -- not used variable.

$asm = [testassembly]::new()
$asm.environment = $environment
$asm."run-date" = $rundate
Expand Down
7 changes: 3 additions & 4 deletions tools/packaging/packaging.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -4587,7 +4587,6 @@ function Invoke-AzDevOpsLinuxPackageBuild {
# Remove symbol files, xml document files.
Remove-Item "${buildFolder}\*.pdb", "${buildFolder}\*.xml" -Force


## Build 'linux-arm' and create 'tar.gz' package for it.
## Note that 'linux-arm' can only be built on Ubuntu environment.
$buildFolder = "${env:SYSTEM_ARTIFACTSDIRECTORY}/${arm32LinuxBuildFolder}"
Expand All @@ -4600,14 +4599,14 @@ function Invoke-AzDevOpsLinuxPackageBuild {
# Remove symbol files.
Remove-Item "${buildFolder}\*.pdb" -Force
} elseif ($BuildType -eq 'rpm') {
## Build 'min-size'
## Build for Mariner

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block is for building mariner package, not min-size.

$options = Get-PSOptions
Write-Verbose -Verbose "---- Min-Size ----"
Write-Verbose -Verbose "---- Mariner ----"
Write-Verbose -Verbose "options.Output: $($options.Output)"
Write-Verbose -Verbose "options.Top $($options.Top)"
$binDir = Join-Path -Path $options.Top -ChildPath 'bin'
if (Test-Path -Path $binDir) {
Write-Verbose -Verbose "Remove $binDir, to get a clean build for min-size package"
Write-Verbose -Verbose "Remove $binDir, to get a clean build for Mariner package"
Remove-Item -Path $binDir -Recurse -Force
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ jobs:
$BuildPath = '$(System.ArtifactsDirectory)\$(SymbolsFolder)'

Update-PSSignedBuildFolder -BuildPath $BuildPath -SignedFilesPath $SignedFilesPath
if ($env:BuildConfiguration -eq 'minSize') {
## Remove XML files when making a min-size package.
Remove-Item "$BuildPath/*.xml" -Force
}
displayName: Merge ThirdParty signed files with Build
condition: and(succeeded(), eq(variables['SHOULD_SIGN'], 'true'))

Expand Down