mirror of
https://github.com/YosysHQ/sby.git
synced 2025-09-03 01:58:09 +00:00
tests: Add long running cancellation
Actually exercise the database cancellation working on an already running task. This appears to work even with `make -j1`.
This commit is contained in:
parent
1f3b418018
commit
63b43c7e66
2 changed files with 106 additions and 0 deletions
14
tests/intertask/longrunning.sh
Normal file
14
tests/intertask/longrunning.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ $TASK == bmc ]]; then
|
||||
python3 $SBY_MAIN --prefix $WORKDIR -f $SBY_FILE prove bmc
|
||||
else
|
||||
python3 $SBY_MAIN --prefix $WORKDIR -f $SBY_FILE --statusreset || true
|
||||
python3 $SBY_MAIN --prefix $WORKDIR -f $SBY_FILE bmc --statuscancels & bmc_pid="$!"
|
||||
# make sure we don't leave the background task running
|
||||
trap 'kill "$bmc_pid" 2>/dev/null || true' EXIT
|
||||
python3 $SBY_MAIN --prefix $WORKDIR -f $SBY_FILE prove
|
||||
sleep 10
|
||||
test -e ${WORKDIR}_bmc/CANCELLED
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue