Skip to content

Commit 96d7b7f

Browse files
committed
Add run_all.ps1 and run_all_headless.ps1
1 parent 89765f8 commit 96d7b7f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

examples/run_all.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cargo build --bins
2+
@(Get-ChildItem -Directory -Name) | %{cargo run --bin $_}
3+
rm pipeline-caching\pipeline_cache.bin

examples/run_all_headless.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
foreach ($example in Get-ChildItem -Directory -Name) {
2+
$proc = Start-Process -FilePath "cargo" -ArgumentList "run --bin $example" -NoNewWindow -PassThru
3+
4+
$timeouted = $null
5+
6+
Wait-Process -InputObject $proc -Timeout 15 -ErrorAction SilentlyContinue -ErrorVariable timeouted
7+
8+
if ($timeouted) {
9+
kill $proc
10+
} elseif ($proc.ExitCode -ne 0) {
11+
Exit $proc.ExitCode
12+
}
13+
}

0 commit comments

Comments
 (0)