mirror of
https://github.com/YosysHQ/yosys
synced 2025-11-06 22:36:05 +00:00
Docs: Bringing prereqs in line
Add comments in setup-build-env/action.yml for where to document prereqs (and the separation between build/run and test). Add some initial (very basic) text for `test_suites.rst`, listing prereqs and how to run the tests (with subsections for the different optional tests, which is currently docs, functional and unit). Add sphinx-inline-tabs, use it for tidying up prereq instructions based on OS/platform (mostly helpful in the test suites doc where there are multiple sections split by OS). Also fixes some single backticks that should be double backtick.
This commit is contained in:
parent
a4bd40e199
commit
cc5642c904
6 changed files with 117 additions and 39 deletions
|
|
@ -1,7 +1,72 @@
|
|||
Testing Yosys
|
||||
=============
|
||||
|
||||
.. TODO:: more about the included test suite and how to add tests
|
||||
.. todo:: adding tests (makefile-tests vs seed-tests)
|
||||
|
||||
Running the included test suite
|
||||
-------------------------------
|
||||
|
||||
The Yosys source comes with a test suite to avoid regressions and keep
|
||||
everything working as expected. Tests can be run by calling ``make test`` from
|
||||
the root Yosys directory.
|
||||
|
||||
Functional tests
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Testing functional backends (see
|
||||
:doc:`/yosys_internals/extending_yosys/functional_ir`) has a few requirements in
|
||||
addition to those listed in :ref:`getting_started/installation:Build
|
||||
prerequisites`:
|
||||
|
||||
.. tab:: Ubuntu
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo apt-get install racket
|
||||
raco pkg install rosette
|
||||
pip install pytest-xdist pytest-xdist-gnumake
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
.. code:: console
|
||||
|
||||
brew install racket
|
||||
raco pkg install rosette
|
||||
pip install pytest-xdist pytest-xdist-gnumake
|
||||
|
||||
If you don't have one of the :ref:`getting_started/installation:CAD suite(s)`
|
||||
installed, you should also install Z3 `following their
|
||||
instructions <https://github.com/Z3Prover/z3>`_.
|
||||
|
||||
Then, set the :makevar:`ENABLE_FUNCTIONAL_TESTS` make variable when calling
|
||||
``make test`` and the functional tests will be run as well.
|
||||
|
||||
Unit tests
|
||||
~~~~~~~~~~
|
||||
|
||||
Running the unit tests requires the following additional packages:
|
||||
|
||||
.. tab:: Ubuntu
|
||||
|
||||
.. code:: console
|
||||
|
||||
sudo apt-get install libgtest-dev
|
||||
|
||||
.. tab:: macOS
|
||||
|
||||
No additional requirements.
|
||||
|
||||
Unit tests can be run with ``make unit-test``.
|
||||
|
||||
Docs tests
|
||||
~~~~~~~~~~
|
||||
|
||||
There are some additional tests for checking examples included in the
|
||||
documentation, which can be run by calling ``make test`` from the
|
||||
:file:`yosys/docs` sub-directory (or ``make -C docs test`` from the root). This
|
||||
also includes checking some macro commands to ensure that descriptions of them
|
||||
are kept up to date, and is mostly intended for CI.
|
||||
|
||||
|
||||
Automatic testing
|
||||
-----------------
|
||||
|
|
@ -14,8 +79,6 @@ compiler versions. For up to date information, including OS versions, refer to
|
|||
.. _Yosys Git repo: https://github.com/YosysHQ/yosys
|
||||
.. _the git actions page: https://github.com/YosysHQ/yosys/actions
|
||||
|
||||
.. todo:: are unit tests currently working
|
||||
|
||||
..
|
||||
How to add a unit test
|
||||
----------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue