46 lines
1.4 KiB
PowerShell
46 lines
1.4 KiB
PowerShell
param(
|
|
[string] $ExportDirectory = "artifacts\conformance\latest",
|
|
[string] $AetheriaRoot = "E:\Projects\Aetheria",
|
|
[string] $ConsumerDirectory = "artifacts\aetheria-conformance-consumer-smoke"
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
$projectRoot = Split-Path -Parent $PSScriptRoot
|
|
$sourceExport = if ([System.IO.Path]::IsPathRooted($ExportDirectory)) {
|
|
$ExportDirectory
|
|
} else {
|
|
Join-Path $projectRoot $ExportDirectory
|
|
}
|
|
$consumerRoot = if ([System.IO.Path]::IsPathRooted($ConsumerDirectory)) {
|
|
$ConsumerDirectory
|
|
} else {
|
|
Join-Path $projectRoot $ConsumerDirectory
|
|
}
|
|
$consumerExport = Join-Path $consumerRoot "export"
|
|
|
|
if (-not (Test-Path $sourceExport)) {
|
|
throw "Conformance export not found: $sourceExport"
|
|
}
|
|
if (-not (Test-Path $AetheriaRoot)) {
|
|
throw "Aetheria repo not found: $AetheriaRoot"
|
|
}
|
|
|
|
if (Test-Path $consumerExport) {
|
|
Remove-Item -LiteralPath $consumerExport -Recurse -Force
|
|
}
|
|
New-Item -ItemType Directory -Force -Path $consumerRoot | Out-Null
|
|
Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
|
|
|
|
$consumerScript = Join-Path $projectRoot "tools\conformance\consume-export.mjs"
|
|
|
|
Push-Location $AetheriaRoot
|
|
try {
|
|
node $consumerScript $consumerExport `
|
|
--expect-pack provider `
|
|
--expect-fixture aetheria-world `
|
|
--expect-provider aetheria `
|
|
--expect-scenario aetheria-world-command-replay
|
|
} finally {
|
|
Pop-Location
|
|
}
|