aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/sanity/005examples
diff options
context:
space:
mode:
author1138-4EB <1138-4EB@users.noreply.github.com>2019-11-11 18:46:36 +0000
committertgingold <tgingold@users.noreply.github.com>2019-11-11 19:46:36 +0100
commit8599d9ddd15b15afdeced6059b1e1b7a972f4db1 (patch)
tree499b9c6fe0f85ce7ed221f72ac31036eefde0194 /testsuite/sanity/005examples
parent22775978be88c5ea8e5b740734e42eeb2fef0968 (diff)
downloadghdl-8599d9ddd15b15afdeced6059b1e1b7a972f4db1.tar.gz
ghdl-8599d9ddd15b15afdeced6059b1e1b7a972f4db1.tar.bz2
ghdl-8599d9ddd15b15afdeced6059b1e1b7a972f4db1.zip
Update doc (#1003)
* doc: update makefile and build scripts * actions: add workflow 'doc' * doc: reorganize sections * doc: fix 'unknown option' warnings, headings, spaces, etc. * doc: add subdir 'examples', move 'quick_start' sources * doc: add section 'Development/Debugging' * doc: add section'Development/Synthesis' * doc: update roadmap * doc: add section examples * doc: use standard domain * doc: add comment about 'vhd' vs 'vhdl'
Diffstat (limited to 'testsuite/sanity/005examples')
-rw-r--r--testsuite/sanity/005examples/extract_vhdl.py30
-rwxr-xr-xtestsuite/sanity/005examples/testsuite.sh11
2 files changed, 3 insertions, 38 deletions
diff --git a/testsuite/sanity/005examples/extract_vhdl.py b/testsuite/sanity/005examples/extract_vhdl.py
deleted file mode 100644
index fa2243caa..000000000
--- a/testsuite/sanity/005examples/extract_vhdl.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-import sys
-
-def extract(out):
- # Skip until the first line
- while (1):
- l = sys.stdin.readline()
- if l == '':
- return False
- if l == '.. code-block:: VHDL\n':
- break
-
- # Write example
- while (1):
- l = sys.stdin.readline()
- if l[0] == '\n':
- out.write(l)
- elif len(l) >= 2 and l[:2] == ' ':
- out.write(l[2:])
- else:
- break
-
- return True
-
-for f in sys.argv[1:]:
- print("Extracting {}...".format(f))
- with open(f, "w") as out:
- if not extract(out):
- sys.exit(1)
-sys.exit(0)
diff --git a/testsuite/sanity/005examples/testsuite.sh b/testsuite/sanity/005examples/testsuite.sh
index c52b0c6a8..dd41bbcec 100755
--- a/testsuite/sanity/005examples/testsuite.sh
+++ b/testsuite/sanity/005examples/testsuite.sh
@@ -2,20 +2,15 @@
. ../../testenv.sh
-# Skip the test if python is not available.
-if ! python -V > /dev/null 2>&1; then
- echo "test skipped, python not found"
- exit 0
-fi
-
# Skip the test if ../../../doc is not available.
if [ ! -d ../../../doc ]; then
echo "test skipped, '../../../doc' not found"
exit 0
fi
-# Extract examples
-python extract_vhdl.py hello.vhdl heartbeat.vhdl adder.vhdl adder_tb.vhdl < ../../../doc/using/QuickStartGuide.rst
+for d in ../../../doc/examples/quick_start/*/; do
+ cp "$d"*.vhdl ./
+done
analyze hello.vhdl
elab_simulate hello_world