Skip to content

Commit

Permalink
doc: introduce sphinx extlinks
Browse files Browse the repository at this point in the history
With sphinx extlinks we are now able to avoid duplication of the
github repo link inside documentation. The patch introduces two new
directives which can be used: :repo: and :master:, which are used to
replace repo static link and repo master static link respectively.

Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Petr Vorel <[email protected]>
Signed-off-by: Andrea Cervesato <[email protected]>
  • Loading branch information
acerv authored and pevik committed Apr 19, 2024
1 parent b150e3a commit 03333e6
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
7 changes: 6 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@

extensions = [
'linuxdoc.rstKernelDoc',
'sphinxcontrib.spelling'
'sphinxcontrib.spelling',
'sphinx.ext.extlinks'
]

exclude_patterns = ["html*", '_static*']
extlinks = {
'repo': ('https://github.com/linux-test-project/ltp/%s', '%s'),
'master': ('https://github.com/linux-test-project/ltp/blob/master/%s', '%s')
}

spelling_lang = "en_US"
spelling_warning = True
Expand Down
4 changes: 2 additions & 2 deletions doc/developers/writing_tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,11 @@ of the stable kernel ABI, the associated test must be moved out of staging.
Testing builds with GitHub Actions
----------------------------------

Master branch is tested in `GitHub Actions <https://github.com/linux-test-project/ltp/actions>`_
Master branch is tested in GitHub :repo:`actions`
to ensure LTP builds in various distributions, including old, current and
bleeding edge. ``gcc`` and ``clang`` toolchains are also tested for various
architectures using cross-compilation. For a full list of tested distros, please
check ``.github/workflows/ci.yml``.
check :repo:`.github/workflows/ci.yml`.

.. note::

Expand Down
18 changes: 8 additions & 10 deletions doc/maintainers/ltp_release_procedure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Tag the git and push changes to github
The string ``YYYYMMDD`` should be substituted to the current date.

You can use `tools/tag-release.sh <https://github.com/linux-test-project/ltp/blob/master/tools/tag-release.sh>`_
script to have the above automated process.
It allows you to verify the tag before pushing it and does other checks.
You can use :master:`tools/tag-release.sh` script to have the above automated
process. It allows you to verify the tag before pushing it and does other
checks.

.. code-block:: bash
Expand Down Expand Up @@ -121,9 +121,9 @@ metadata documentation:
make -C metadata
cp -v docparse/metadata.html ../metadata.YYYYMMDD.html
You can use `tools/create-tarballs-metadata.sh <https://github.com/linux-test-project/ltp/blob/master/tools/create-tarballs-metadata.sh>`_
script to have the above procedure automated. All generated files are placed
in the ``ltp-release-YYYYMMDD`` directory.
You can use :master:`tools/create-tarballs-metadata.sh` script to have the above
procedure automated. All generated files are placed in the
``ltp-release-YYYYMMDD`` directory.

.. code-block:: bash
Expand All @@ -149,10 +149,8 @@ in the ``ltp-release-YYYYMMDD`` directory.
Upload the generated files to GitHub
------------------------------------

Click on `Releases <https://github.com/linux-test-project/ltp/releases>`_, then
switch to `Tags <https://github.com/linux-test-project/ltp/tags>`_. Click on
'Add release notes'. There should be 'Attach binaries ...' link at the
bottom of the page.
Go to :repo:`tags`. Click on ``Add release notes``.
There should be ``Attach binaries ...`` link at the bottom of the page.

Don't forget to upload checksums for the tarballs and metadata documentation
as well.
Expand Down
2 changes: 1 addition & 1 deletion doc/users/quick_start.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Basics requirements to build LTP are the following:
.. note::

For optional library dependencies, take a look at the scripts inside ``ci/``
For optional library dependencies, take a look at the scripts inside :master:`ci/`
directory.

Running single tests
Expand Down
6 changes: 4 additions & 2 deletions doc/users/supported_systems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Oldest tested distributions
- 2.17
- \-

For a full list of tested distros, please check :master:`.github/workflows/ci.yml`.

Older distributions are not officially supported, which means that it
may or may not work. It all depends on your luck. It should be possible
to compile latest LTP even on slightly older distributions than we
Expand Down Expand Up @@ -99,10 +101,10 @@ Supported C libraries
- Older uClibc might have problems.

* - `musl <https://musl.libc.org/>`_
- Not yet fully supported. Check ``ci/alpine.sh`` script.
- Not yet fully supported. Check :master:`ci/alpine.sh` script.

* - Android
- Please use `AOSP fork <https://android.googlesource.com/platform/external/ltp>`_
- Please use `AOSP fork <https://android.googlesource.com/platform/external/ltp>`_.

C version
---------
Expand Down

0 comments on commit 03333e6

Please sign in to comment.