aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/testsuite.sh
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2020-05-10 07:56:48 -0700
committerGitHub <noreply@github.com>2020-05-10 16:56:48 +0200
commita0919fe84b25f37d0307805650379830094fcfbf (patch)
tree01d1e5693e7ce954495eca1473319a32057c57fe /testsuite/testsuite.sh
parent06202188e0e88c0096518415413c08bd0471644b (diff)
downloadghdl-a0919fe84b25f37d0307805650379830094fcfbf.tar.gz
ghdl-a0919fe84b25f37d0307805650379830094fcfbf.tar.bz2
ghdl-a0919fe84b25f37d0307805650379830094fcfbf.zip
Constants in vpi (#1297)
* Adding some very basic vpi tests. * Modify test so that's it's checking VPI access to constants. * Provide VPI to access constants. * Add vpi tests to testsuite. * Fix bug to allow getting values of generic/constant boolean and std_logic. * Fix stupid copying mistake in last commit. * Formatting and trying to get tests working on windows. * Fixing comment and removing redundant VhpiConstantDeclK
Diffstat (limited to 'testsuite/testsuite.sh')
-rwxr-xr-xtestsuite/testsuite.sh29
1 files changed, 28 insertions, 1 deletions
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index ae6b7f54f..f060e763c 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -177,6 +177,32 @@ do_synth () {
#---
+do_vpi () {
+ gstart "[GHDL - test] vpi"
+ cd vpi
+
+ for d in *[0-9]; do
+ cd $d
+ if ./testsuite.sh > test.log 2>&1 ; then
+ printf "vpi $d: ${ANSI_GREEN}ok${ANSI_NOCOLOR}\n"
+ # Don't disp log
+ else
+ printf "vpi $d: ${ANSI_RED}failed${ANSI_NOCOLOR}\n"
+ cat test.log
+ failures="$failures $d"
+ fi
+ cd ..
+ # Stop at the first failure
+ [ "$failures" = "" ] || break
+ done
+
+ cd ..
+ gend
+ [ "$failures" = "" ] || exit 1
+}
+
+#---
+
if [ "x$GHDL" = "x" ]; then
if [ "x$prefix" != "x" ]; then
export GHDL="$prefix/bin/ghdl"
@@ -200,7 +226,7 @@ for opt; do
esac
done
-if [ "x$tests" = "x" ]; then tests="sanity gna vests synth"; fi
+if [ "x$tests" = "x" ]; then tests="sanity gna vests synth vpi"; fi
echo "tests: $tests"
@@ -211,6 +237,7 @@ do_test() {
gna) do_gna;;
vests) do_vests;;
synth) do_synth;;
+ vpi) do_vpi;;
*)
printf "${ANSI_RED}$0: test name '$1' is unknown${ANSI_NOCOLOR}\n"
exit 1;;