Add EveUnity split handoff proof
This commit is contained in:
parent
ef16b0c90b
commit
88406ea9f0
10 changed files with 232 additions and 8 deletions
|
|
@ -36,6 +36,9 @@ if ($manifest.incubation.currentHostRepo -ne "Eve") {
|
|||
if ($manifest.incubation.splitTarget -ne "EveUnity") {
|
||||
throw "Unexpected EveUnity split target: $($manifest.incubation.splitTarget)"
|
||||
}
|
||||
if (-not $manifest.incubation.splitHandoff.manifestPath) {
|
||||
throw "EveUnity manifest missing split handoff path"
|
||||
}
|
||||
|
||||
foreach ($feature in @("embeddedDocuments")) {
|
||||
if (-not ($manifest.supportedFeatures -contains $feature)) {
|
||||
|
|
@ -89,6 +92,11 @@ if ($LASTEXITCODE -ne 0) {
|
|||
throw "Aetheria Unity package smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
& (Join-Path $projectRoot "scripts\run-eveunity-split-handoff-smoke.ps1")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveUnity split handoff smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
if ($RunUnityEditMode) {
|
||||
& (Join-Path $projectRoot "scripts\run-aetheria-unity-editmode-tests.ps1")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
|
|
|
|||
102
scripts/run-eveunity-split-handoff-smoke.ps1
Normal file
102
scripts/run-eveunity-split-handoff-smoke.ps1
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
param(
|
||||
[string] $HandoffPath = "packages\org.gamecult.eve.unity-uitoolkit\eveunity-split-handoff.json",
|
||||
[string] $CapabilityPath = "packages\org.gamecult.eve.unity-uitoolkit\eve-runtime-capability.json"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$absoluteHandoffPath = if ([System.IO.Path]::IsPathRooted($HandoffPath)) {
|
||||
$HandoffPath
|
||||
} else {
|
||||
Join-Path $projectRoot $HandoffPath
|
||||
}
|
||||
$absoluteCapabilityPath = if ([System.IO.Path]::IsPathRooted($CapabilityPath)) {
|
||||
$CapabilityPath
|
||||
} else {
|
||||
Join-Path $projectRoot $CapabilityPath
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $absoluteHandoffPath)) {
|
||||
throw "EveUnity split handoff manifest not found: $absoluteHandoffPath"
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $absoluteCapabilityPath)) {
|
||||
throw "EveUnity runtime capability manifest not found: $absoluteCapabilityPath"
|
||||
}
|
||||
|
||||
$handoff = Get-Content -LiteralPath $absoluteHandoffPath -Raw | ConvertFrom-Json
|
||||
$capability = Get-Content -LiteralPath $absoluteCapabilityPath -Raw | ConvertFrom-Json
|
||||
|
||||
if ($handoff.schema -ne "gamecult.eve.runtime_split_handoff.v1") {
|
||||
throw "Unexpected EveUnity split handoff schema: $($handoff.schema)"
|
||||
}
|
||||
if ($handoff.splitTarget -ne "EveUnity") {
|
||||
throw "Unexpected EveUnity split handoff target: $($handoff.splitTarget)"
|
||||
}
|
||||
if ($handoff.ownerRepo -ne "EveUnity") {
|
||||
throw "Unexpected EveUnity split handoff owner: $($handoff.ownerRepo)"
|
||||
}
|
||||
if ($handoff.currentHostRepo -ne "Eve") {
|
||||
throw "Unexpected EveUnity split handoff host: $($handoff.currentHostRepo)"
|
||||
}
|
||||
if ($handoff.runtimeId -ne "unity-uitoolkit") {
|
||||
throw "Unexpected EveUnity split handoff runtime: $($handoff.runtimeId)"
|
||||
}
|
||||
if ($capability.incubation.splitHandoff.manifestPath -ne $HandoffPath.Replace("\", "/")) {
|
||||
$expectedPath = $HandoffPath.Replace("\", "/")
|
||||
throw "EveUnity capability manifest does not point at split handoff. Expected $expectedPath got $($capability.incubation.splitHandoff.manifestPath)"
|
||||
}
|
||||
|
||||
$expectedStages = @("release", "test", "capture")
|
||||
foreach ($stage in $expectedStages) {
|
||||
if (-not $capability.lifecycle.$stage) {
|
||||
throw "EveUnity capability lifecycle missing stage: $stage"
|
||||
}
|
||||
}
|
||||
|
||||
$moveSets = @($handoff.moveSets)
|
||||
foreach ($stage in $expectedStages) {
|
||||
$moveSet = $moveSets | Where-Object { $_.stage -eq $stage } | Select-Object -First 1
|
||||
if (-not $moveSet) {
|
||||
throw "EveUnity split handoff missing move set for stage: $stage"
|
||||
}
|
||||
if ($moveSet.destinationOwner -ne "EveUnity") {
|
||||
throw "EveUnity split handoff stage $stage has unexpected destination owner: $($moveSet.destinationOwner)"
|
||||
}
|
||||
if (-not $moveSet.replacementProof) {
|
||||
throw "EveUnity split handoff stage $stage missing replacement proof"
|
||||
}
|
||||
|
||||
$pendingProofs = @($capability.lifecycle.$stage.pendingProofs)
|
||||
if (-not ($pendingProofs -contains $moveSet.replacementProof)) {
|
||||
throw "EveUnity split handoff stage $stage replacement proof is not mirrored in runtime capability pending proofs: $($moveSet.replacementProof)"
|
||||
}
|
||||
|
||||
foreach ($relativePath in @($moveSet.currentPaths)) {
|
||||
$absolutePath = Join-Path $projectRoot $relativePath
|
||||
if (-not (Test-Path -LiteralPath $absolutePath)) {
|
||||
throw "EveUnity split handoff stage $stage references missing current path: $relativePath"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($contract in @(
|
||||
"gamecult.eve.surface.v1",
|
||||
"gamecult.eve.command.v1",
|
||||
"gamecult.eve.provider_advertisement.v1",
|
||||
"gamecult.eve.plugin_advertisement.v1",
|
||||
"gamecult.eve.plugin.v1",
|
||||
"gamecult.eve.conformance_export.v1"
|
||||
)) {
|
||||
if (-not (@($handoff.contractInputs) -contains $contract)) {
|
||||
throw "EveUnity split handoff missing contract input: $contract"
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($proof in @($handoff.requiredExternalProofs)) {
|
||||
if (-not $proof) {
|
||||
throw "EveUnity split handoff contains an empty required external proof"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "EveUnity split handoff smoke passed: $absoluteHandoffPath"
|
||||
|
|
@ -14,6 +14,7 @@ $env:EVE_PARITY_OUTPUT = if ([System.IO.Path]::IsPathRooted($OutputDirectory)) {
|
|||
Push-Location $projectRoot
|
||||
try {
|
||||
node .\tools\parity\run-parity.mjs
|
||||
& (Join-Path $PSScriptRoot "run-eveunity-split-handoff-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-conformance-consumer-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-plugin-owner-conformance-consumer-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-runtime-owner-conformance-consumer-smoke.ps1")
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ try {
|
|||
--expect-split-target EveUnity `
|
||||
--expect-split-target-status EveUnity:incubating `
|
||||
--expect-split-target-proof "EveUnity:Unity lifecycle evidence is declared" `
|
||||
--expect-split-target-proof "EveUnity:EveUnity split handoff is machine-readable" `
|
||||
--expect-split-target-blocker "EveUnity:Tagged UPM release" `
|
||||
--expect-split-target-blocker "EveUnity:Unity batchmode EditMode runner" `
|
||||
--expect-split-target-blocker "EveUnity:Unity batchmode or editor capture artifact"
|
||||
|
|
|
|||
Loading…
Reference in a new issue