Add EveElectron semantic capture artifact
This commit is contained in:
parent
595ce6fbf4
commit
3f7e381ea8
10 changed files with 292 additions and 20 deletions
73
scripts/run-eveelectron-capture-smoke.ps1
Normal file
73
scripts/run-eveelectron-capture-smoke.ps1
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
param(
|
||||
[string] $CapabilityManifestPath = "runtimes\incubating\eve-electron\eve-runtime-capability.json",
|
||||
[string] $AdvertisementPath = "web\fixtures\aetheria.provider-advertisement.json",
|
||||
[string] $SurfacePath = "web\fixtures\aetheria-world-surface.json",
|
||||
[string] $OutputPath = "artifacts\eveelectron-capture\latest\electron-shell-projection.json",
|
||||
[string] $RequestOutputPath = "artifacts\eveelectron-capture\latest\capture-request.json",
|
||||
[string] $Stamp = "latest"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
function Resolve-RepoPath([string] $candidate) {
|
||||
if ([System.IO.Path]::IsPathRooted($candidate)) {
|
||||
return $candidate
|
||||
}
|
||||
return Join-Path $projectRoot $candidate
|
||||
}
|
||||
|
||||
$absoluteCapabilityPath = Resolve-RepoPath $CapabilityManifestPath
|
||||
$absoluteAdvertisementPath = Resolve-RepoPath $AdvertisementPath
|
||||
$absoluteSurfacePath = Resolve-RepoPath $SurfacePath
|
||||
$absoluteOutputPath = Resolve-RepoPath $OutputPath
|
||||
$absoluteRequestOutputPath = Resolve-RepoPath $RequestOutputPath
|
||||
|
||||
foreach ($path in @($absoluteCapabilityPath, $absoluteAdvertisementPath, $absoluteSurfacePath)) {
|
||||
if (-not (Test-Path -LiteralPath $path)) {
|
||||
throw "EveElectron capture input not found: $path"
|
||||
}
|
||||
}
|
||||
|
||||
node --test (Join-Path $projectRoot "tools\eveelectron\eveelectron-capture-artifact.test.mjs")
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveElectron capture artifact tests failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
node (Join-Path $projectRoot "tools\eveelectron\eveelectron-capture-artifact.mjs") `
|
||||
--capability $absoluteCapabilityPath `
|
||||
--advertisement $absoluteAdvertisementPath `
|
||||
--surface $absoluteSurfacePath `
|
||||
--output $absoluteOutputPath `
|
||||
--request-output $absoluteRequestOutputPath `
|
||||
--stamp $Stamp
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "EveElectron capture artifact builder failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
|
||||
foreach ($path in @($absoluteOutputPath, $absoluteRequestOutputPath)) {
|
||||
if (-not (Test-Path -LiteralPath $path)) {
|
||||
throw "EveElectron capture artifact output missing: $path"
|
||||
}
|
||||
}
|
||||
|
||||
$projection = Get-Content -LiteralPath $absoluteOutputPath -Raw | ConvertFrom-Json
|
||||
foreach ($expectation in @(
|
||||
@{ field = "schema"; value = "gamecult.eve.electron_shell_projection.v1" },
|
||||
@{ field = "runtimeId"; value = "electron-shell" },
|
||||
@{ field = "providerId"; value = "aetheria" },
|
||||
@{ field = "surfaceId"; value = "aetheria.daemon.game" },
|
||||
@{ field = "commandBoundary"; value = "aetheria.daemon.commands" },
|
||||
@{ field = "receiptSchema"; value = "aetheria.eve_command_acceptance_status.v1" },
|
||||
@{ field = "artifactKind"; value = "json-projection" },
|
||||
@{ field = "captureKind"; value = "electron-shell-projection-json" }
|
||||
)) {
|
||||
if ($projection.($expectation.field) -ne $expectation.value) {
|
||||
throw "EveElectron projection $($expectation.field) expected $($expectation.value) got $($projection.($expectation.field))"
|
||||
}
|
||||
}
|
||||
if (-not $projection.root.id) {
|
||||
throw "EveElectron projection capture must contain a root shell node"
|
||||
}
|
||||
|
||||
Write-Host "EveElectron capture smoke passed: $absoluteOutputPath"
|
||||
|
|
@ -194,5 +194,6 @@ foreach ($pathProperty in @("requestBuilder", "advertisementPath")) {
|
|||
& (Join-Path $projectRoot "scripts\run-eveelectron-release-contract-smoke.ps1")
|
||||
& (Join-Path $projectRoot "scripts\run-eveelectron-provider-shell-smoke.ps1")
|
||||
& (Join-Path $projectRoot "scripts\run-eveelectron-capture-contract-smoke.ps1")
|
||||
& (Join-Path $projectRoot "scripts\run-eveelectron-capture-smoke.ps1")
|
||||
|
||||
Write-Host "EveElectron lifecycle smoke passed: $absoluteManifestPath"
|
||||
|
|
|
|||
|
|
@ -133,7 +133,8 @@ node $consumerScript $consumerExport `
|
|||
--expect-runtime-capture-status android-flutter:adb-png `
|
||||
--expect-runtime-capture-status unity-uitoolkit:semantic `
|
||||
--expect-runtime-capture-status unity-scene:missing `
|
||||
--expect-runtime-capture-status electron-shell:missing `
|
||||
--expect-runtime-capture-status electron-shell:json-projection `
|
||||
--expect-runtime-capture-artifact electron-shell:json-projection:gamecult.eve.electron_shell_projection.v1:aetheria:aetheria.daemon.game `
|
||||
--expect-runtime-capture-status tui:json-grid `
|
||||
--expect-runtime-capture-artifact tui:json-grid:gamecult.eve.tui_grid.v1:aetheria:aetheria.daemon.game `
|
||||
--expect-runtime-capture-status direct2d:missing `
|
||||
|
|
|
|||
Loading…
Reference in a new issue