fix: harden PCB and iCDB verification lifecycle for beta release

This commit is contained in:
阿白叔 committed 2026-10-26 15:32:01 +08:00
1 parent 11a2b2e46e
commit a11eb3c766
33 files changed
+1226 -267

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$root = Split-Path $PSScriptRoot -Parent
Import-Module (Join-Path $root 'CBBRefresh.Core.psm1') -Force
$scratch = Join-Path $root ('build\content-check-exit-' + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $scratch | Out-Null
$exe = Join-Path $scratch 'ReuseBlockImporter.exe'
Add-Type -TypeDefinition @'
using System;
public class FakeImporter {
public static int Main(string[] args) {
Console.WriteLine("content checking completed successfully");
return 7;
}
}
'@ -OutputAssembly $exe -OutputType ConsoleApplication
$library = Join-Path $scratch 'test.lmc'
[IO.File]::WriteAllText($library, '')
$result = Invoke-CbbReuseBlockContentCheck -LmcFile $library -BlockName 'CBB' -LibSpec 'test' -DmsLoginConfig 'test' -MentorBin $scratch
if ($result.result -ne 'fail' -or $result.exitCode -ne 7) {
throw 'A nonzero native exit must not pass, even when stdout claims success.'
}
Write-Output 'Content-check exit-code regression passed (no Mentor data opened).'