diff --git a/examples/run_all.ps1 b/examples/run_all.ps1 new file mode 100644 index 0000000000..9cbd8b2bb9 --- /dev/null +++ b/examples/run_all.ps1 @@ -0,0 +1,3 @@ +cargo build --bins +@(Get-ChildItem -Directory -Name) | %{cargo run --bin $_} +rm pipeline-caching\pipeline_cache.bin diff --git a/examples/run_all_headless.ps1 b/examples/run_all_headless.ps1 new file mode 100644 index 0000000000..edf1fddd58 --- /dev/null +++ b/examples/run_all_headless.ps1 @@ -0,0 +1,13 @@ +foreach ($example in Get-ChildItem -Directory -Name) { + $proc = Start-Process -FilePath "cargo" -ArgumentList "run --bin $example" -NoNewWindow -PassThru + + $timeouted = $null + + Wait-Process -InputObject $proc -Timeout 15 -ErrorAction SilentlyContinue -ErrorVariable timeouted + + if ($timeouted) { + kill $proc + } elseif ($proc.ExitCode -ne 0) { + Exit $proc.ExitCode + } +}