@@ -471,17 +471,40 @@ if ($UseTestStandHarness) {
471471 if ($logDir -and -not (Test-Path - LiteralPath $logDir )) { New-Item - ItemType Directory - Path $logDir - Force | Out-Null }
472472 }
473473
474+ $iterationExecutionTopology = [ordered ]@ {
475+ runtimeSurface = ' windows-native-teststand'
476+ processModelClass = if ($TestStandSuiteClass -eq ' dual-plane-parity' ) { ' parallel-process-model' } else { ' sequential-process-model' }
477+ windowsOnly = $true
478+ requestedSimultaneous = ($TestStandSuiteClass -eq ' dual-plane-parity' )
479+ cellClass = $executionCellLeaseMetadata.cellClass
480+ executionCellLeasePath = $executionCellLeasePath
481+ executionCellId = $executionCellId
482+ executionCellLeaseId = $executionCellLeaseId
483+ harnessInstanceLeasePath = $harnessInstanceLeasePath
484+ harnessInstanceLeaseId = $harnessInstanceLeaseMetadata.leaseId
485+ harnessInstanceId = $harnessInstanceId
486+ }
487+
474488 $exitCode = 0
475- Write-JsonEvent ' harnessInvoke' @ { iteration = $currentIteration ; output = $iterationRoot ; status = ' start' }
489+ Write-JsonEvent ' harnessInvoke' @ { iteration = $currentIteration ; output = $iterationRoot ; status = ' start' ; executionTopology = $iterationExecutionTopology }
476490 try {
477491 & $resolvedHarness @harnessParams | Out-Null
478492 $exitCode = $LASTEXITCODE
479493 $sessionMetadata = Get-TestStandHarnessSessionMetadata - IterationRoot $iterationRoot
480494 if (-not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceId ) -or -not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceLeaseId ) -or -not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceLeasePath )) {
481495 $latestHarnessSessionMetadata.Value = $sessionMetadata
496+ if (-not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceId )) {
497+ $iterationExecutionTopology.harnessInstanceId = $sessionMetadata.harnessInstanceId
498+ }
499+ if (-not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceLeaseId )) {
500+ $iterationExecutionTopology.harnessInstanceLeaseId = $sessionMetadata.harnessInstanceLeaseId
501+ }
502+ if (-not [string ]::IsNullOrWhiteSpace($sessionMetadata.harnessInstanceLeasePath )) {
503+ $iterationExecutionTopology.harnessInstanceLeasePath = $sessionMetadata.harnessInstanceLeasePath
504+ }
482505 }
483506 } catch {
484- Write-JsonEvent ' harnessResult' @ { iteration = $currentIteration ; status = ' exception' ; message = $_.Exception.Message }
507+ Write-JsonEvent ' harnessResult' @ { iteration = $currentIteration ; status = ' exception' ; message = $_.Exception.Message ; executionTopology = $iterationExecutionTopology }
485508 throw
486509 } finally {
487510 if ($restoreHarnessLog ) {
@@ -490,7 +513,7 @@ if ($UseTestStandHarness) {
490513 $env: HARNESS_LOG = $originalHarnessLog
491514 }
492515 }
493- Write-JsonEvent ' harnessResult' @ { iteration = $currentIteration ; exitCode = $exitCode }
516+ Write-JsonEvent ' harnessResult' @ { iteration = $currentIteration ; exitCode = $exitCode ; executionTopology = $iterationExecutionTopology }
494517 return $exitCode
495518 }
496519 $skipValidation = $false
@@ -697,6 +720,19 @@ if ($UseTestStandHarness -and $harnessPlan) {
697720 $planPayload.harnessRuntimeSurface = $harnessPlan.runtimeSurface
698721 $planPayload.harnessProcessModelClass = $harnessPlan.processModelClass
699722 $planPayload.harnessRequestedSimultaneous = $harnessPlan.requestedSimultaneous
723+ $planPayload.executionTopology = [ordered ]@ {
724+ runtimeSurface = $harnessPlan.runtimeSurface
725+ processModelClass = $harnessPlan.processModelClass
726+ windowsOnly = $harnessPlan.windowsOnly
727+ requestedSimultaneous = $harnessPlan.requestedSimultaneous
728+ cellClass = $harnessPlan.cellClass
729+ executionCellLeasePath = $harnessPlan.executionCellLeasePath
730+ executionCellId = $harnessPlan.executionCellId
731+ executionCellLeaseId = $harnessPlan.executionCellLeaseId
732+ harnessInstanceLeasePath = $harnessPlan.harnessInstanceLeasePath
733+ harnessInstanceLeaseId = $harnessPlan.harnessInstanceLeaseId
734+ harnessInstanceId = $harnessPlan.harnessInstanceId
735+ }
700736}
701737Write-JsonEvent ' plan' $planPayload
702738
@@ -715,6 +751,19 @@ if ($DryRun) {
715751 $dryRunPayload.harnessOutput = $harnessPlan.output
716752 $dryRunPayload.harnessRuntimeSurface = $harnessPlan.runtimeSurface
717753 $dryRunPayload.harnessProcessModelClass = $harnessPlan.processModelClass
754+ $dryRunPayload.executionTopology = [ordered ]@ {
755+ runtimeSurface = $harnessPlan.runtimeSurface
756+ processModelClass = $harnessPlan.processModelClass
757+ windowsOnly = $harnessPlan.windowsOnly
758+ requestedSimultaneous = $harnessPlan.requestedSimultaneous
759+ cellClass = $harnessPlan.cellClass
760+ executionCellLeasePath = $harnessPlan.executionCellLeasePath
761+ executionCellId = $harnessPlan.executionCellId
762+ executionCellLeaseId = $harnessPlan.executionCellLeaseId
763+ harnessInstanceLeasePath = $harnessPlan.harnessInstanceLeasePath
764+ harnessInstanceLeaseId = $harnessPlan.harnessInstanceLeaseId
765+ harnessInstanceId = $harnessPlan.harnessInstanceId
766+ }
718767 }
719768 Write-JsonEvent ' dryRun' $dryRunPayload
720769 Set-LoopExit 0
0 commit comments