Skip to content

Commit

Permalink
Add run_all.ps1 and run_all_headless.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
marc0246 committed Oct 31, 2023
1 parent 13dde86 commit 6ed3110
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/run_all.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cargo build --bins
@(Get-ChildItem -Directory -Name) | %{cargo run --bin $_}
rm pipeline-caching\pipeline_cache.bin
13 changes: 13 additions & 0 deletions examples/run_all_headless.ps1
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit 6ed3110

Please sign in to comment.