Import CBB refresh verify r4 stability baseline
Preserve tested Verify source, authoritative READY checks, bounded bridge retries, diagnostics and failure-only reporting. Include 336-test suite and packaging assets; exclude live Mentor samples, field logs, backups and distributions.
This commit is contained in:
commit
11a2b2e46e
130 files changed
+19267
No files matched your search
@@ -0,0 +1,57 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory)][string]$LmcFile,
|
||||
[Parameter(Mandatory)][string]$BlockName,
|
||||
[Parameter(Mandatory)][string]$LibSpec,
|
||||
[Parameter(Mandatory)][string]$DmsLoginConfig,
|
||||
[string]$MentorBin = $env:SDD_LM_BIN,
|
||||
[string]$ReportPath,
|
||||
[string]$EvidenceJson,
|
||||
[int]$TimeoutSeconds = 120
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$module = Join-Path $PSScriptRoot 'CBBRefresh.Core.psm1'
|
||||
Import-Module $module -Force
|
||||
|
||||
try {
|
||||
$invokeArgs = @{
|
||||
LmcFile = $LmcFile
|
||||
BlockName = $BlockName
|
||||
LibSpec = $LibSpec
|
||||
DmsLoginConfig = $DmsLoginConfig
|
||||
MentorBin = $MentorBin
|
||||
ReportPath = $ReportPath
|
||||
TimeoutSeconds = $TimeoutSeconds
|
||||
}
|
||||
$check = Invoke-CbbReuseBlockContentCheck @invokeArgs
|
||||
if (-not [string]::IsNullOrWhiteSpace($EvidenceJson)) {
|
||||
$parent = Split-Path -Parent ([IO.Path]::GetFullPath($EvidenceJson))
|
||||
if ($parent -and -not (Test-Path -LiteralPath $parent -PathType Container)) {
|
||||
New-Item -ItemType Directory -Path $parent -Force | Out-Null
|
||||
}
|
||||
$check | ConvertTo-Json -Depth 8 | Set-Content -LiteralPath $EvidenceJson -Encoding UTF8
|
||||
}
|
||||
$check | ConvertTo-Json -Depth 8
|
||||
switch ($check.result) {
|
||||
'pass' { exit 0 }
|
||||
'fail' { exit 4 }
|
||||
'timeout' { exit 5 }
|
||||
default { exit 3 }
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$errorResult = [pscustomobject]@{
|
||||
operation = 'reuse_block_content_check'
|
||||
result = 'error'
|
||||
error = $_.Exception.ToString()
|
||||
lmcFile = $LmcFile
|
||||
blockName = $BlockName
|
||||
}
|
||||
$errorResult | ConvertTo-Json -Depth 8
|
||||
if (-not [string]::IsNullOrWhiteSpace($EvidenceJson)) {
|
||||
$errorResult | ConvertTo-Json -Depth 8 | Set-Content -LiteralPath $EvidenceJson -Encoding UTF8
|
||||
}
|
||||
exit 2
|
||||
}
|
||||
Reference in new issue
Block a user