tests/sva: Skip sva tests that use SBY until SBY is compatible again

This commit is part of a PR that requires corresponding changes in SBY.
To prevent CI failures, detect whether those changes already landed and
skip the SBY using tests until then.
This commit is contained in:
Jannis Harder 2024-03-05 14:37:33 +01:00
parent ff6c29ab1e
commit 0db76c6ec4
1 changed files with 21 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ex
set -e
prefix=${1%.ok}
prefix=${prefix%.sv}
@ -58,16 +58,33 @@ generate_sby() {
}
if [ -f $prefix.ys ]; then
set -x
$PWD/../../yosys -q -e "Assert .* failed." -s $prefix.ys
elif [ -f $prefix.sv ]; then
generate_sby pass > ${prefix}_pass.sby
generate_sby fail > ${prefix}_fail.sby
# Check that SBY is up to date enough for this yosys version
if sby --help | grep -q -e '--status'; then
set -x
sby --yosys $PWD/../../yosys -f ${prefix}_pass.sby
sby --yosys $PWD/../../yosys -f ${prefix}_fail.sby
else
echo "sva test '${prefix}' requires an up to date SBY, skipping"
fi
else
generate_sby pass > ${prefix}.sby
# Check that SBY is up to date enough for this yosys version
if sby --help | grep -q -e '--status'; then
set -x
sby --yosys $PWD/../../yosys -f ${prefix}.sby
else
echo "sva test '${prefix}' requires an up to date SBY, skipping"
fi
fi
{ set +x; } &>/dev/null
touch $prefix.ok