fix(presentation): reuse counting views and gate native QA readiness
This commit is contained in:
@@ -18,6 +18,19 @@ $oldAdb=$env:ADB
|
||||
try {
|
||||
$env:ADB=Join-Path $env:LOCALAPPDATA 'Android/Sdk/platform-tools/adb.exe'
|
||||
$process=Start-Process $exe -ArgumentList ($arguments | ForEach-Object {'"'+$_+'"'}) -WindowStyle Hidden -RedirectStandardOutput ($OutputPath+'.stdout') -RedirectStandardError ($OutputPath+'.stderr') -PassThru
|
||||
$record.recorderPid=$process.Id
|
||||
$ready=$false
|
||||
for ($attempt=0; $attempt -lt 100; $attempt++) {
|
||||
$process.Refresh()
|
||||
if ($process.HasExited) { break }
|
||||
if ((Get-Content -LiteralPath ($OutputPath+'.stdout') -Raw -ErrorAction SilentlyContinue) -match 'Recording started to wav file:') {
|
||||
$record.readyUtc=[DateTime]::UtcNow.ToString('o')
|
||||
@{recorderPid=$process.Id;readyUtc=$record.readyUtc;method=$record.method} | ConvertTo-Json | Set-Content -LiteralPath ($OutputPath+'.ready.json') -Encoding utf8
|
||||
$ready=$true; break
|
||||
}
|
||||
Start-Sleep -Milliseconds 100
|
||||
}
|
||||
if (!$ready) { if (!$process.HasExited) { $process.Kill(); $process.WaitForExit() }; throw 'Android PCM recorder did not report recording started' }
|
||||
if (!$process.WaitForExit(($Seconds+20)*1000)) { $process.Kill();throw 'Android PCM 녹음 종료 시간 초과' }
|
||||
$process.Refresh();$record.exitCode=$process.ExitCode
|
||||
if ($process.ExitCode -ne 0) { throw "Android PCM recorder exit $($process.ExitCode)" }
|
||||
|
||||
Reference in New Issue
Block a user