aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/pyunit/dom/AllSources.py23
-rwxr-xr-xtestsuite/testsuite.sh2
2 files changed, 24 insertions, 1 deletions
diff --git a/testsuite/pyunit/dom/AllSources.py b/testsuite/pyunit/dom/AllSources.py
new file mode 100644
index 000000000..645394742
--- /dev/null
+++ b/testsuite/pyunit/dom/AllSources.py
@@ -0,0 +1,23 @@
+from sys import executable
+from subprocess import check_call, STDOUT
+from pathlib import Path
+from glob import glob
+from pytest import mark
+
+if __name__ == "__main__":
+ print("ERROR: you called a testcase declaration file as an executable module.")
+ print("Use: 'python -m unitest <testcase module>'")
+ exit(1)
+
+
+@mark.parametrize(
+ "file",
+ glob(str(Path(__file__).resolve().parent.parent.parent.parent / '**' / '*.vhdl'), recursive=True)
+)
+@mark.xfail
+def test_AllVHDLSources(file):
+ check_call([
+ executable,
+ str(Path(__file__).resolve().parent.parent.parent.parent / 'pyGHDL' / 'cli' / 'DOM.py'),
+ file
+ ], stderr=STDOUT)
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index 8026af974..3408c2f4f 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -130,7 +130,7 @@ do_test() {
pyunit)
# The Python Unit testsuite: regression testsuite for Python bindings to libghdl
gstart "[GHDL - test] pyunit"
- PYTHONPATH=$(pwd)/.. ${PYTHON:-python3} -m pytest -rA pyunit
+ PYTHONPATH=$(pwd)/.. ${PYTHON:-python3} -m pytest -vsrA pyunit
gend
;;