aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/testenv.sh
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-10-23 07:51:44 +0200
committerTristan Gingold <tgingold@free.fr>2015-10-23 07:51:44 +0200
commit978cf0e8a286d2cec52d8f33a70040dce8610bdb (patch)
tree46a14c64033ec1e2909bd3c12296c5ee2be4a2e6 /testsuite/testenv.sh
parente59043ad0cea266574fa9bb5fa8cac55a3956cad (diff)
downloadghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.tar.gz
ghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.tar.bz2
ghdl-978cf0e8a286d2cec52d8f33a70040dce8610bdb.zip
testsuite: allow spaces in GHDL variable.
Diffstat (limited to 'testsuite/testenv.sh')
-rw-r--r--testsuite/testenv.sh24
1 files changed, 12 insertions, 12 deletions
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
}