Add Final Android gate with fresh native thirty-stage progression
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
param([Parameter(Mandatory)][string]$EvidenceDir)
|
||||
$ErrorActionPreference='Stop'
|
||||
New-Item -ItemType Directory -Path $EvidenceDir -Force | Out-Null
|
||||
$EvidenceDir=(Resolve-Path -LiteralPath $EvidenceDir).Path
|
||||
$sandbox=Join-Path $EvidenceDir ('dispatch-'+[guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Path $sandbox | Out-Null
|
||||
Copy-Item -LiteralPath (Join-Path $PSScriptRoot 'smoke.ps1') -Destination (Join-Path $sandbox 'smoke.ps1')
|
||||
@'
|
||||
param([string]$ApkPath,[string]$EvidenceDir,[string]$Serial)
|
||||
@{apk=$ApkPath;serial=$Serial;entrypoint='Final'}|ConvertTo-Json|Set-Content (Join-Path $EvidenceDir 'final-marker.json')
|
||||
exit 37
|
||||
'@ | Set-Content -LiteralPath (Join-Path $sandbox 'exercise-final.ps1')
|
||||
& pwsh -NoProfile -File (Join-Path $sandbox 'smoke.ps1') -Milestone Final -ApkPath 'sentinel-final.apk' -Serial 'sentinel-device' -EvidenceDir $sandbox *> (Join-Path $sandbox 'invocation.log')
|
||||
$actualExit=$LASTEXITCODE
|
||||
$markerPath=Join-Path $sandbox 'final-marker.json'
|
||||
$marker=if(Test-Path -LiteralPath $markerPath){Get-Content -LiteralPath $markerPath -Raw|ConvertFrom-Json}else{$null}
|
||||
$passed=$actualExit-eq37-and$marker.entrypoint-eq'Final'-and$marker.apk-eq'sentinel-final.apk'-and$marker.serial-eq'sentinel-device'
|
||||
@{criterion='Final dispatches Final script with arguments and propagates nonzero exit, never FirstSlice';passed=$passed;actualExit=$actualExit;marker=$marker;sandbox=$sandbox}|ConvertTo-Json -Depth 4|Set-Content (Join-Path $EvidenceDir 'dispatch-result.json')
|
||||
if(!$passed){Write-Host "Final dispatch regression: actual exit $actualExit, marker present $([bool]$marker)";exit 1}
|
||||
exit 0
|
||||
Reference in New Issue
Block a user