diff options
author | Tristan Gingold <tgingold@free.fr> | 2015-10-23 07:51:44 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2015-10-23 07:51:44 +0200 |
commit | 978cf0e8a286d2cec52d8f33a70040dce8610bdb (patch) | |
tree | 46a14c64033ec1e2909bd3c12296c5ee2be4a2e6 /testsuite | |
parent | e59043ad0cea266574fa9bb5fa8cac55a3956cad (diff) | |
download | ghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.tar.gz ghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.tar.bz2 ghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.zip |
testsuite: allow spaces in GHDL variable.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/gna/bug16144/testsuite.sh | 2 | ||||
-rwxr-xr-x | testsuite/gna/ticket30/testsuite.sh | 4 | ||||
-rwxr-xr-x | testsuite/gna/ticket51/testsuite.sh | 6 | ||||
-rwxr-xr-x | testsuite/gna/ticket77/testsuite.sh | 2 | ||||
-rw-r--r-- | testsuite/testenv.sh | 24 |
5 files changed, 19 insertions, 19 deletions
diff --git a/testsuite/gna/bug16144/testsuite.sh b/testsuite/gna/bug16144/testsuite.sh index 7a261edee..31752782a 100755 --- a/testsuite/gna/bug16144/testsuite.sh +++ b/testsuite/gna/bug16144/testsuite.sh @@ -2,6 +2,6 @@ . ../../testenv.sh -$GHDL --lines adder.vhdl +"$GHDL" --lines adder.vhdl echo "Test successful" diff --git a/testsuite/gna/ticket30/testsuite.sh b/testsuite/gna/ticket30/testsuite.sh index 47e207682..78d21cc8b 100755 --- a/testsuite/gna/ticket30/testsuite.sh +++ b/testsuite/gna/ticket30/testsuite.sh @@ -2,8 +2,8 @@ . ../../testenv.sh -$GHDL -i lib_numeric_tb.vhd -$GHDL -m numeric_tb +"$GHDL" -i lib_numeric_tb.vhd +"$GHDL" -m numeric_tb simulate numeric_tb --stop-time=10ns --wave=numeric_tb.ghw \ --sdf=typ==lib_numeric_tb.sdf diff --git a/testsuite/gna/ticket51/testsuite.sh b/testsuite/gna/ticket51/testsuite.sh index ae261dcc3..2eb6c9d1c 100755 --- a/testsuite/gna/ticket51/testsuite.sh +++ b/testsuite/gna/ticket51/testsuite.sh @@ -5,11 +5,11 @@ analyze ent.vhdl elab_simulate ent -if $GHDL -v | grep -q mcode; then +if "$GHDL" -v | grep -q mcode; then echo "-o not supported by mcode" else - $GHDL --elab-run -o ent1 ent - $GHDL --elab-run -o $PWD/ent2 ent + "$GHDL" --elab-run -o ent1 ent + "$GHDL" --elab-run -o "$PWD/ent2" ent fi rm -f ent1 ent2 diff --git a/testsuite/gna/ticket77/testsuite.sh b/testsuite/gna/ticket77/testsuite.sh index cc5d75451..7f717335a 100755 --- a/testsuite/gna/ticket77/testsuite.sh +++ b/testsuite/gna/ticket77/testsuite.sh @@ -11,7 +11,7 @@ analyze_elab_simulate_status() analyze $file set +e echo "elaborate and simulate $ent" - $GHDL --elab-run $GHDL_STD_FLAGS $ent + "$GHDL" --elab-run $GHDL_STD_FLAGS $ent if [ $? -ne $status ]; then echo "Exit status $status expected" exit 1 diff --git a/testsuite/testenv.sh b/testsuite/testenv.sh index ccce922b2..60dc09eca 100644 --- a/testsuite/testenv.sh +++ b/testsuite/testenv.sh @@ -22,7 +22,7 @@ GET_ENTITIES=../get_entities # Exit in case of failure in shell scripts. set -e -if [ x$GHDL = x ]; then +if [ x"$GHDL" = x ]; then echo "error: GHDL environment variable is not defined" exit 4 fi @@ -31,7 +31,7 @@ fi analyze () { echo "analyze $@" - $GHDL -a $GHDL_STD_FLAGS $GHDL_FLAGS $@ + "$GHDL" -a $GHDL_STD_FLAGS $GHDL_FLAGS $@ } # Analyze files (failure expected) @@ -39,7 +39,7 @@ analyze_failure () { echo "try to analyze $@" # for arg in $@; do echo "arg: $arg"; done - if ! $GHDL -a --expect-failure $GHDL_STD_FLAGS $GHDL_FLAGS $@ ; then + if ! "$GHDL" -a --expect-failure $GHDL_STD_FLAGS $GHDL_FLAGS $@ ; then echo "Failure expected" return 1 fi @@ -50,7 +50,7 @@ analyze_failure () elab () { echo "elaborate $@" - $GHDL -e $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ + "$GHDL" -e $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ } # Elaborate a design (failure expected) @@ -58,7 +58,7 @@ elab () elab_failure () { echo "elaborate (failure expected) $@" - $GHDL -e --expect-failure $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ + "$GHDL" -e --expect-failure $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ } # Simulate a design (no error expected) @@ -66,7 +66,7 @@ elab_failure () simulate () { echo "simulate $@ ($GHDL_FLAGS $@ $GHDL_SIMFLAGS)" >&2 - $GHDL -r $GHDL_STD_FLAGS $GHDL_FLAGS "$@" $GHDL_SIMFLAGS + "$GHDL" -r $GHDL_STD_FLAGS $GHDL_FLAGS "$@" $GHDL_SIMFLAGS #./$@ } @@ -75,7 +75,7 @@ simulate () simulate_failure () { echo "simulate (failure expected) $@" >&2 - $GHDL -r $GHDL_STD_FLAGS $GHDL_FLAGS $@ --expect-failure + "$GHDL" -r $GHDL_STD_FLAGS $GHDL_FLAGS $@ --expect-failure #./$@ } @@ -83,21 +83,21 @@ simulate_failure () elab_simulate () { echo "elaborate and simulate $@" - $GHDL --elab-run $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ + "$GHDL" --elab-run $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS $@ } # Elaborate and simulate a design (failure expected) elab_simulate_failure () { echo "elaborate and simulate (failure expected) $@" - $GHDL --elab-run $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS \ + "$GHDL" --elab-run $GHDL_STD_FLAGS $GHDL_FLAGS $GHDL_ELABFLAGS \ $@ --expect-failure } # Check if a feature is present ghdl_has_feature () { - $GHDL -r $GHDL_STD_FLAGS $GHDL_FLAGS $1 --has-feature=$2 + "$GHDL" -r $GHDL_STD_FLAGS $GHDL_FLAGS $1 --has-feature=$2 } # Run a program @@ -122,9 +122,9 @@ clean () { if [ $# -eq 0 ]; then echo "Remove work library" - $GHDL --remove $GHDL_STD_FLAGS + "$GHDL" --remove $GHDL_STD_FLAGS else echo "Remove $1 library" - $GHDL --remove $GHDL_STD_FLAGS --work=$1 + "$GHDL" --remove $GHDL_STD_FLAGS --work=$1 fi } |