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

cd $(dirname "$0")

. ../../testenv.sh

if $GHDL --help | grep -q -e --link; then
    if [ -z $CC ]; then
        CC="gcc"
    fi

    analyze hello.vhdl
    elab -Wl,main.c hello
    run ./hello

    clean
    rm -f main.o

    analyze hello.vhdl
    elab -Wl,main_notnull.c hello
    run ./hello

    clean
    rm -f main.o
else
    echo "Test not supported by the configuration"
fi

echo "Test successful"