aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue880/testsuite.sh
blob: 1bef788f25b8bb05875d927c59a0c00725e128bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh

. ../../testenv.sh

GHDL_STD_FLAGS="-fpsl"
analyze psl.vhdl
elab psl
if ghdl_has_feature psl psl; then
  simulate psl --psl-report=psl.out

  if ! diff_nocr psl.out psl.ref > /dev/null; then
      echo "report mismatch"
      exit 1
  fi

  rm -f psl.out
fi
clean

# Using vhdl 08
GHDL_STD_FLAGS="-fpsl --std=08"
analyze psl.vhdl
elab -fpsl psl
if ghdl_has_feature psl psl; then
  simulate psl --psl-report=psl.out

  diff_nocr -q psl.out psl.ref

  rm -f psl.out
fi
clean

# Usage example (python 2.7):
#
# import json
# d=json.load(open("psl.out"))
# print d['summary']
#  {u'assert-pass': 2, u'cover': 1, ... }
# print d['summary']['assert']

echo "Test successful"