aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2020-12-28 23:55:56 +0100
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2020-12-28 23:55:56 +0100
commit3e6c7275d2c48e4aa56a6dc1cec536250c1e95fd (patch)
treebb5e06760c6757a2697df7e6efb88bba5821f7c1
parentd5b65813b36bf0e179d514ebd872a8b4f5cc79e7 (diff)
parent262c531cd39412ee3ea1e019f102b9cbfc698da0 (diff)
downloadghdl-3e6c7275d2c48e4aa56a6dc1cec536250c1e95fd.tar.gz
ghdl-3e6c7275d2c48e4aa56a6dc1cec536250c1e95fd.tar.bz2
ghdl-3e6c7275d2c48e4aa56a6dc1cec536250c1e95fd.zip
Merge remote-tracking branch 'github-umarcor/py/GHDL' into paebbels/pyGHDL
-rw-r--r--.github/workflows/doc.yml2
-rwxr-xr-xdist/ci-run.sh2
-rw-r--r--doc/using/pyGHDL/index.rst2
-rw-r--r--doc/using/pyGHDL/utils.rst4
-rw-r--r--pyGHDL/lsp/README2
-rwxr-xr-xtestsuite/pyunit/testsuite.sh57
-rwxr-xr-xtestsuite/testsuite.sh19
7 files changed, 75 insertions, 13 deletions
diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml
index 5cd33e03b..3ca172187 100644
--- a/.github/workflows/doc.yml
+++ b/.github/workflows/doc.yml
@@ -16,7 +16,7 @@ jobs:
run: |
docker build -t ghdl/doc - <<-EOF
FROM ghdl/vunit:llvm
- ENV PYTHONPATH=/src/python
+ ENV PYTHONPATH=/src/pyGHDL
RUN apt update -qq && apt install -y gnat-gps \
&& ln -s /usr/bin/pip3 /usr/bin/pip
EOF
diff --git a/dist/ci-run.sh b/dist/ci-run.sh
index 1db79fc34..70e6b6d44 100755
--- a/dist/ci-run.sh
+++ b/dist/ci-run.sh
@@ -429,7 +429,7 @@ ci_run () {
GHDL_TEST_IMAGE="test:$GHDL_IMAGE_TAG-py"
docker build -t "$GHDL_TEST_IMAGE" - <<-EOF
FROM ghdl/ghdl:$GHDL_IMAGE_TAG
-RUN apt update -qq && apt install -y python
+RUN apt update -qq && apt install -y python3
EOF
;;
*)
diff --git a/doc/using/pyGHDL/index.rst b/doc/using/pyGHDL/index.rst
index ddbddec45..2b2191798 100644
--- a/doc/using/pyGHDL/index.rst
+++ b/doc/using/pyGHDL/index.rst
@@ -8,4 +8,4 @@ Python Interface
libghdl
vhdl
- pyutils
+ utils
diff --git a/doc/using/pyGHDL/utils.rst b/doc/using/pyGHDL/utils.rst
new file mode 100644
index 000000000..682cb198b
--- /dev/null
+++ b/doc/using/pyGHDL/utils.rst
@@ -0,0 +1,4 @@
+libghdl.utils
+===============
+
+.. automodule:: libghdl.utils
diff --git a/pyGHDL/lsp/README b/pyGHDL/lsp/README
index c82ccc4d4..f9595f15f 100644
--- a/pyGHDL/lsp/README
+++ b/pyGHDL/lsp/README
@@ -9,7 +9,7 @@ develop tools around the parser and analyzer.
To install:
1) First install ghdl (add --enable-python during configuration).
This is needed so that the libraries are available
-2) In ghdl/python, install pyghdl. There is a setup.py script, so you can do:
+2) In ghdl, install pyGHDL. There is a setup.py script, so you can do:
$ pip install .
To install for development: pip install -e .
Add --user to install in your home directory.
diff --git a/testsuite/pyunit/testsuite.sh b/testsuite/pyunit/testsuite.sh
new file mode 100755
index 000000000..7eac028ca
--- /dev/null
+++ b/testsuite/pyunit/testsuite.sh
@@ -0,0 +1,57 @@
+#! /bin/sh
+
+# Driver for a testsuite.
+
+set -e
+
+# This is the only place where test dirs are specified. Do not duplicate this
+# line
+#dirs="*[0-9]"
+#
+#failures=""
+#full=n
+#
+#for opt; do
+# case "$opt" in
+# -k | --keep-going) full=y ;;
+# --dir=*) dirs=`echo $opt | sed -e 's/--dir=//'` ;;
+# --skip=*) d=`echo $opt | sed -e 's/--skip=//'`
+# dirs=`echo "" $dirs | sed -e "s/ $d//"` ;;
+# --start-at=*) d=`echo $opt | sed -e 's/--start-at=//'`
+# dirs=`echo "" $dirs | sed -e "s/^.* $d//"`
+# dirs="$d $dirs" ;;
+# --list-tests) echo $dirs; exit 0;;
+# *) echo "Unknown option $opt"
+# exit 2
+# ;;
+# esac
+#done
+#
+#singlerun() {
+# echo ""
+# echo "dir $1:"
+# cd $1
+# if ! ./testsuite.sh; then
+# echo "#################################################################"
+# echo "######### FAILURE: $1"
+# echo "#################################################################"
+# if [ $2 = "y" ]; then
+# failures="$failures $1"
+# else
+# exit 1;
+# fi
+# fi
+# cd ..
+#}
+#
+#for i in $dirs; do singlerun $i $full; done
+#
+#if [ x"$failures" = x"" ]; then
+# echo "tests are successful" && exit 0
+#else
+# echo "test failed ($failures)" && exit 1
+#fi
+
+cd $(dirname "$0")/..
+
+python3 -m unittest pyunit
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index b77ccdbc5..b46ffcdc4 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -143,15 +143,16 @@ do_pyunit () {
gstart "[GHDL - test] pyunit"
cd pyunit
- dirs=`./testsuite.sh --list-tests`
- if ./testsuite.sh > test.log 2>&1 ; then
- printf "pyunit: ${ANSI_GREEN}ok${ANSI_NOCOLOR}\n"
- # Don't disp log
- else
- printf "pyunit: ${ANSI_RED}failed${ANSI_NOCOLOR}\n"
- cat test.log
- failures="$failures"
- fi
+ ./testsuite.sh
+
+# if ./testsuite.sh > test.log 2>&1 ; then
+# printf "pyunit: ${ANSI_GREEN}ok${ANSI_NOCOLOR}\n"
+# # Don't disp log
+# else
+# printf "pyunit: ${ANSI_RED}failed${ANSI_NOCOLOR}\n"
+# cat test.log
+# failures="$failures"
+# fi
cd ..
gend