Observe native save completion with a bounded rapid-count poll
This commit is contained in:
@@ -40,7 +40,15 @@ try {
|
|||||||
$result.rapidStartedUtc=[DateTime]::UtcNow.ToString('o')
|
$result.rapidStartedUtc=[DateTime]::UtcNow.ToString('o')
|
||||||
for($pindex=0;$pindex-lt$points.Count;$pindex++){$p=$points[$pindex];Adb @('shell','input','tap',"$($p[0])","$($p[1])")|Out-Null;if($pindex-eq0){Adb @('shell','input','tap',"$($p[0])","$($p[1])")|Out-Null}}
|
for($pindex=0;$pindex-lt$points.Count;$pindex++){$p=$points[$pindex];Adb @('shell','input','tap',"$($p[0])","$($p[1])")|Out-Null;if($pindex-eq0){Adb @('shell','input','tap',"$($p[0])","$($p[1])")|Out-Null}}
|
||||||
$result.rapidFinishedUtc=[DateTime]::UtcNow.ToString('o')
|
$result.rapidFinishedUtc=[DateTime]::UtcNow.ToString('o')
|
||||||
$done=Save 'twenty-rapid-after';Check 'twenty-native-rapid-complete' ($done.latestFreePlay.sourceStageId-eq20-and@($done.puzzleStates|Where-Object stageId -eq 20).Count-eq0-and(Same $save.completedStageIds $done.completedStageIds)-and(Same $actual.balls $done.latestFreePlay.balls)-and(Same $actual.camera $done.latestFreePlay.camera)) 'Ten direct taps plus duplicate remove replay20 and make exact same board Free20; original actual30 records unchanged'
|
$result.freeObservations=@();$freeObserved=$false
|
||||||
|
for($poll=0;$poll-lt30;$poll++){
|
||||||
|
$done=Save "twenty-rapid-observation-$poll"
|
||||||
|
$freeObserved=$done.latestFreePlay.sourceStageId-eq20-and@($done.puzzleStates|Where-Object stageId -eq 20).Count-eq0-and(Same $save.completedStageIds $done.completedStageIds)-and(Same $actual.balls $done.latestFreePlay.balls)-and(Same $actual.camera $done.latestFreePlay.camera)
|
||||||
|
$result.freeObservations+=@{poll=$poll;utc=[DateTime]::UtcNow.ToString('o');passed=$freeObserved;path=(Join-Path $EvidenceDir "twenty-rapid-observation-$poll.json")}
|
||||||
|
if($freeObserved){Copy-Item -LiteralPath (Join-Path $EvidenceDir "twenty-rapid-observation-$poll.json") -Destination (Join-Path $EvidenceDir 'twenty-rapid-after.json');break}
|
||||||
|
Start-Sleep -Milliseconds 50
|
||||||
|
}
|
||||||
|
Check 'twenty-native-rapid-complete' $freeObserved 'Bounded native input/save observation: ten direct taps plus duplicate remove replay20 and make exact same board Free20; original actual30 records unchanged'
|
||||||
$result.sameBoardFreeObservedUtc=[DateTime]::UtcNow.ToString('o')
|
$result.sameBoardFreeObservedUtc=[DateTime]::UtcNow.ToString('o')
|
||||||
# Wrapper launch precedes native PCM start: this elapsed time bounds Free observation conservatively.
|
# Wrapper launch precedes native PCM start: this elapsed time bounds Free observation conservatively.
|
||||||
$result.freeObservationPcmAgeUpperBoundSeconds=([DateTime]::UtcNow-$recorders[-1].startedUtc).TotalSeconds
|
$result.freeObservationPcmAgeUpperBoundSeconds=([DateTime]::UtcNow-$recorders[-1].startedUtc).TotalSeconds
|
||||||
|
|||||||
Reference in New Issue
Block a user