aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/ticket77/testsuite.sh
blob: 7f717335ae681267bcf760c00478831d7465be31 (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
#! /bin/sh

. ../../testenv.sh

analyze_elab_simulate_status()
{
  file=$1
  ent=$2
  status=$3

  analyze $file
  set +e
  echo "elaborate and simulate $ent"
  "$GHDL" --elab-run $GHDL_STD_FLAGS $ent
  if [ $? -ne $status ]; then
    echo "Exit status $status expected"
    exit 1
  fi
  set -e
}

GHDL_STD_FLAGS=--std=08
analyze_elab_simulate_status bug1.vhdl ent1 1
analyze_elab_simulate_status bug2.vhdl ent2 1
analyze_elab_simulate_status bug3.vhdl ent3 7
analyze_elab_simulate_status bug4.vhdl ent4 0

clean

echo "Test successful"