rt/rust/test.bash
Chris Copeland 4da8e59ea0
fix cond.c after sem refactor
add comments about atomicity of cond_wait

add cond examples
2024-05-17 00:04:57 -07:00

34 lines
466 B
Bash
Executable File

#!/bin/bash
set -e
cargo build --release --examples
examples=(
cond donate empty float mutex notify once queue rwlock sem simple sleep
water-sem water-condvar
)
exitcode=0
trap 'exitcode=1' ABRT
script_pid="$$"
function run_example {
trap '' ABRT
if ! "target/release/examples/$1"; then
echo "$1" failed
kill -ABRT -- "$script_pid"
fi
}
for e in "${examples[@]}"; do
echo "running $e..."
run_example "$e" &
done
wait
exit "$exitcode"