3
0
Fork 0
mirror of https://github.com/YosysHQ/sby.git synced 2025-10-30 20:42:30 +00:00

tests: Add statusdb test

Ensures that `--statusreset` doesn't break the schema.
This commit is contained in:
Krystine Sherwin 2025-07-08 15:44:02 +12:00
parent 10040ce859
commit b1d9bcbb42
No known key found for this signature in database
3 changed files with 46 additions and 0 deletions

11
tests/statusdb/reset.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
set -e
# run task
python3 $SBY_MAIN -f $SBY_FILE $TASK
# task has 3 properties
python3 $SBY_MAIN -f $SBY_FILE --status | wc -l | grep -q '3'
# resetting task should work
python3 $SBY_MAIN -f $SBY_FILE --statusreset
# clean database should have no properties
python3 $SBY_MAIN -f $SBY_FILE --status | wc -l | grep -q '0'