aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/testsuite.sh
blob: dd3f9e0036283308fdf327a4d70aae5c11ab8860 (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
51
52
53
54
55
56
57
58
59
60
61
62
#! /bin/sh

# Stop in case of error
set -e

. ./testenv.sh

tests=

for opt; do
  case "$opt" in
      [a-z]*) tests="$tests $opt" ;;
      *) echo "$0: unknown option $opt"; exit 2 ;;
  esac
done

if [ x$tests = x ]; then tests="sanity gna vests"; fi

# The GNA testsuite: regression testsuite using reports/issues from gna.org
do_gna()
{
  cd gna
  ./testsuite.sh
  cd ..
}

# The VESTS testsuite: compliance testsuite, from: https://github.com/nickg/vests.git 388250486a
do_vests()
{
  cd vests
  ./testsuite.sh
  cd ..
}

do_sanity()
{
    cd sanity
    ./testsuite.sh
    cd ..
}

# Run a testsuite
do_test() {
  case $1 in
      gna) do_gna;;
      vests) do_vests;;
      sanity) do_sanity;;
      *)
          echo "$0: test name '$1' is unknown"
          exit 1;;
  esac
}


for t in $tests; do do_test $t; done

echo "$0: Success"

echo "GHDL is: $GHDL"
$GHDL --version

exit 0