mirror of
https://github.com/YosysHQ/yosys
synced 2026-06-06 00:50:57 +00:00
docs: Resolving todos
Make explicit the location for the `CMakeUserPresets.json` file. Update docs tests documentation. Move `BUILD_DIR` and `PROGRAM_PREFIX` comments into the functional tests todo. Add cmake to MacPorts/FreeBSD install instructions. Add ccache to example `CMakeUserPresets.json` (it isn't otherwise documented, and is no longer as obvious without an `ENABLE_CCACHE` makevar). Addressing comments
This commit is contained in:
parent
e1931596ae
commit
72f5836fb1
7 changed files with 55 additions and 98 deletions
|
|
@ -64,12 +64,6 @@ edif edif EDIF support
|
|||
liberty synlib Liberty file support
|
||||
============== =========== ===================================
|
||||
|
||||
.. TODO:: CMAKE_TODO
|
||||
|
||||
``yosys-config --cxxflags`` no longer includes the verific features, and the
|
||||
CMakeCache.txt doesn't report auto detected :makevar:`YOSYS_VERIFIC_FEATURES`
|
||||
- can we export these somehow?
|
||||
|
||||
.. note::
|
||||
|
||||
The YosysHQ specific extensions are only available with the TabbyCAD suite.
|
||||
|
|
|
|||
|
|
@ -16,32 +16,20 @@ tests.
|
|||
cmake -B build .
|
||||
cmake --build build --target test --parallel $(nproc)
|
||||
|
||||
.. TODO:: CMAKE_TODO
|
||||
|
||||
Using ``make -C <docs|tests>`` does work, but only if using default
|
||||
:makevar:`BUILD_DIR` (``build``) and :makevar:`PROGRAM_PREFIX` (none).
|
||||
|
||||
Vanilla tests
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
.. TODO:: update for test infra changes
|
||||
|
||||
These make up the majority of our testing coverage. They can be run with the
|
||||
``test-vanilla`` CMake target, or by calling ``make vanilla-test`` from the
|
||||
``tests`` directory, and are based on calls to make subcommands (``make
|
||||
makefile-tests``) and shell scripts (``make seed-tests`` and ``make
|
||||
abcopt-tests``). Both use ``run-test.sh`` files, but make-based tests only call
|
||||
``tests/gen-tests-makefile.sh`` to generate a makefile appropriate for the given
|
||||
directory, so only afterwards when make is invoked do the tests actually run.
|
||||
|
||||
Usually their structure looks something like this:
|
||||
you write a .ys file that gets automatically run,
|
||||
which runs a frontend like ``read_verilog`` or ``read_rtlil`` with
|
||||
a relative path or a heredoc, then runs some commands including the command
|
||||
under test, and then uses :doc:`/using_yosys/more_scripting/selections`
|
||||
with ``-assert-count``. Usually it's unnecessary to "register" the test anywhere
|
||||
as if it's being added to an existing directory, depending
|
||||
on how the ``run-test.sh`` in that directory works.
|
||||
``test-vanilla`` CMake target. Usually their structure looks something like
|
||||
this: you write a .ys file that gets automatically run, which runs a frontend
|
||||
like ``read_verilog`` or ``read_rtlil`` with a relative path or a heredoc, then
|
||||
runs some commands including the command under test, and then uses
|
||||
:doc:`/using_yosys/more_scripting/selections` with ``-assert-count``. Usually
|
||||
it's unnecessary to "register" the test anywhere as if it's being added to an
|
||||
existing directory, depending on how the ``run-test.sh`` in that directory
|
||||
works.
|
||||
|
||||
Unit tests
|
||||
~~~~~~~~~~
|
||||
|
|
@ -90,23 +78,21 @@ instructions <https://github.com/Z3Prover/z3>`_.
|
|||
|
||||
.. TODO:: CMAKE_TODO
|
||||
|
||||
How does this work under CMake? Is it only via ``make -C tests ENABLE_FUNCTIONAL_TESTS=1``
|
||||
How does this work under CMake? Is it only via ``make -C tests
|
||||
ENABLE_FUNCTIONAL_TESTS=1`` and then manually setting ``BUILD_DIR`` and
|
||||
``PROGRAM_PREFIX``? And possibly also setting ``YOSYS`` et al if there is a
|
||||
``.exe``. Previous instructions:
|
||||
|
||||
Then, set the :makevar:`ENABLE_FUNCTIONAL_TESTS` make variable when calling
|
||||
``make test`` and the functional tests will be run as well.
|
||||
Then, set the :makevar:`ENABLE_FUNCTIONAL_TESTS` make variable when calling
|
||||
``make test`` and the functional tests will be run as well.
|
||||
|
||||
Docs tests
|
||||
~~~~~~~~~~
|
||||
|
||||
.. TODO:: CMAKE_TODO
|
||||
|
||||
Is this available via CMake?
|
||||
|
||||
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.
|
||||
documentation, which can be run with the ``test-docs`` CMake target. 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue