# test_c1_echivalenta_lot.ps1 - rulare headless a testului C1 (echivalenta lot vs. document unic) # Scrie in schema de test MARIUSM_AUTO@ROA_CENTRAL - vezi antetul .prg pentru detalii. # Rulare: powershell -ExecutionPolicy Bypass -File test_c1_echivalenta_lot.ps1 $ErrorActionPreference = 'Stop' $Teste = $PSScriptRoot $Prg = Join-Path $Teste 'test_c1_echivalenta_lot.prg' $Fxp = [IO.Path]::ChangeExtension($Prg, '.fxp') $Err = [IO.Path]::ChangeExtension($Prg, '.err') $Log = Join-Path $Teste 'test_c1_echivalenta_lot_log.txt' $Vfp = 'C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe' Remove-Item $Fxp, $Err, $Log -ErrorAction SilentlyContinue $p = Start-Process -FilePath $Vfp -ArgumentList '-A', '-T', "`"$Prg`"" -PassThru if (-not $p.WaitForExit(300000)) { $p.Kill() throw 'TIMEOUT: testul nu s-a terminat in 300s' } if (Test-Path $Err) { throw "Eroare de compilare: $(Get-Content $Err -Raw)" } if (-not (Test-Path $Log)) { throw "Lipseste logul $Log" } Get-Content $Log