aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue687/testsuite.sh
blob: 07e58dab11374934a2efdb4ea55923aece70fc99 (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
42
43
44
45
46
47
48
49
50
#! /bin/sh

. ../../testenv.sh

export GHDL_STD_FLAGS=--std=08

check_output()
{
    if grep -q "bound check failure" $1; then
        return 0
    fi
    if grep -q "mismatching vector length" $1; then
        return 0
    fi
    echo "missing bound check failure"
    exit 1
}

analyze ent.vhdl
elab_simulate_failure tb > tb.err 2>&1
check_output tb.err

clean

analyze ent_ok.vhdl
elab_simulate tb

clean

analyze ent2.vhdl
elab_simulate_failure tb > tb.err 2>&1
check_output tb.err

clean

analyze ent3.vhdl
elab_simulate_failure tb > tb.err 2>&1
check_output tb.err

clean

analyze ent4.vhdl
elab_simulate_failure tb > tb.err 2>&1
check_output tb.err

clean

rm -f tb.err

echo "Test successful"