From c36db20ab9f5fa59a40133d83849a3dc939e136e Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 11 Dec 2017 18:37:35 +0100 Subject: ticket24: check if tested feature is present. --- testsuite/gna/ticket24/testsuite.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'testsuite') diff --git a/testsuite/gna/ticket24/testsuite.sh b/testsuite/gna/ticket24/testsuite.sh index 1336ae331..136317e17 100755 --- a/testsuite/gna/ticket24/testsuite.sh +++ b/testsuite/gna/ticket24/testsuite.sh @@ -2,25 +2,32 @@ . ../../testenv.sh -analyze -fpsl psl.vhdl -elab_simulate -fpsl psl --psl-report=psl.out +GHDL_STD_FLAGS="-fpsl" +analyze psl.vhdl +elab psl +if ghdl_has_feature psl psl; then + simulate psl --psl-report=psl.out -if ! diff --strip-trailing-cr psl.out psl.ref > /dev/null; then - echo "report mismatch" - exit 1 -fi + if ! diff --strip-trailing-cr psl.out psl.ref > /dev/null; then + echo "report mismatch" + exit 1 + fi -rm -f psl.out + rm -f psl.out +fi clean # Using vhdl 08 GHDL_STD_FLAGS="-fpsl --std=08" analyze psl.vhdl -elab_simulate psl --psl-report=psl.out +elab -fpsl psl +if ghdl_has_feature psl psl; then + simulate psl --psl-report=psl.out -diff --strip-trailing-cr -q psl.out psl.ref + diff --strip-trailing-cr -q psl.out psl.ref -rm -f psl.out + rm -f psl.out +fi clean # Usage example (python 2.7): -- cgit v1.2.3