aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1256/testsuite.sh
blob: c2cff49577b45bac4216a5c7a24916815a67375e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

. ../../testenv.sh

analyze enum_test.vhdl
elab enum_test

if c_compiler_is_available && ghdl_has_feature enum_test vpi; then
  add_vpi_path

  $GHDL --vpi-compile -v gcc -c vpi_plugin.c
  $GHDL --vpi-link -v gcc -o vpi_plugin.vpi vpi_plugin.o

  simulate enum_test --vpi=./vpi_plugin.vpi > enum_test.out
  diff --strip-trailing-cr enum_test.ref enum_test.out

  rm -f vpi_plugin.vpi vpi_plugin.o
fi
clean

echo "Test successful"