[LTP] [PATCH 4/6] doc: Replace docparse info with sphinx
Petr Vorel
pvorel@suse.cz
Fri Feb 7 11:55:49 CET 2025
Update doc changes from previous commit.
* Remove docparse example output from release procedure
* Patch review links to building docs with sphinx
* Comments in lib/tst_test.c now point to sphinx
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
doc/developers/writing_tests.rst | 13 +++++++------
doc/maintainers/ltp_release_procedure.rst | 6 ------
doc/maintainers/patch_review.rst | 4 ++--
lib/tst_test.c | 4 ++--
4 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/doc/developers/writing_tests.rst b/doc/developers/writing_tests.rst
index ab633121ed..4e4f5ce34a 100644
--- a/doc/developers/writing_tests.rst
+++ b/doc/developers/writing_tests.rst
@@ -63,12 +63,13 @@ things are done.
Never ever comment the obvious.
-In case of LTP testcases, it's customary to add an asciidoc formatted comment
-paragraph with high-level test description at the beginning of the file right
-under the GPL SPDX header. This helps other people to understand the overall
-goal of the test before they dive into the technical details. It's also
-exported into generated documentation hence it should mostly explain what is
-tested.
+In case of LTP testcases, it's customary to add an `RST
+<https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_
+formatted comment paragraph with high-level test description at the beginning
+of the file right under the GPL SPDX header. This helps other people to
+understand the overall goal of the test before they dive into the technical
+details. It's also exported into generated documentation hence it should mostly
+explain what is tested.
DRY (Code duplication)
~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/maintainers/ltp_release_procedure.rst b/doc/maintainers/ltp_release_procedure.rst
index 5cb0bbb07f..6259afe0ea 100644
--- a/doc/maintainers/ltp_release_procedure.rst
+++ b/doc/maintainers/ltp_release_procedure.rst
@@ -116,11 +116,6 @@ metadata documentation:
sha1 ltp-full-YYYYMMDD.tar.xz > ltp-full-YYYYMMDD.tar.xz.sha1
sha256sum ltp-full-YYYYMMDD.tar.xz > ltp-full-YYYYMMDD.tar.xz.sha256
- # Generate metadata documentation
- ./configure --with-metadata-generator=asciidoctor
- make -C metadata
- cp -v docparse/metadata.html ../metadata.YYYYMMDD.html
-
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.
@@ -143,7 +138,6 @@ procedure automated. All generated files are placed in the
===== Generate metadata documentation =====
checking for a BSD-compatible install... /usr/bin/install -c
...
- 'docparse/metadata.html' -> '/home/foo/ltp-release-YYYYMMDD/metadata.YYYYMMDD.html'
Generated files are in '/home/foo/ltp-release-YYYYMMDD', upload them to github
Upload the generated files to GitHub
diff --git a/doc/maintainers/patch_review.rst b/doc/maintainers/patch_review.rst
index 36caaf23bd..28bc4faf34 100644
--- a/doc/maintainers/patch_review.rst
+++ b/doc/maintainers/patch_review.rst
@@ -47,7 +47,7 @@ The following are examples and may not be appropriate for all tests.
* Compare usage of system calls with kernel code
* Double check commit message
* Search the LTP library for existing helper functions
-* Check doc formatting, i.e. ``make doc && chromium docparse/metadata.html``
+* Check doc formatting, see :doc:`../developers/documentation`.
How to find subtle errors
-------------------------
@@ -149,7 +149,7 @@ C tests
* Use :doc:`../developers/api_c_tests`, implementing :ref:`struct tst_test`
* Test binaries are added into corresponding ``.gitignore`` files
* Check coding style with ``make check``
-* Docparse documentation
+* Metadata documentation
* If a test is a regression test it should include :ref:`.tags<struct tst_tag>` in the
:ref:`struct tst_test` definition
diff --git a/lib/tst_test.c b/lib/tst_test.c
index 934a7f866d..e2803f04a7 100644
--- a/lib/tst_test.c
+++ b/lib/tst_test.c
@@ -44,7 +44,7 @@
*/
const char *TCID __attribute__((weak));
-/* update also docparse/testinfo.pl */
+/* update also doc/conf.py */
#define LINUX_GIT_URL "https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id="
#define LINUX_STABLE_GIT_URL "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id="
#define GLIBC_GIT_URL "https://sourceware.org/git/?p=glibc.git;a=commit;h="
@@ -898,7 +898,7 @@ static void print_failure_hint(const char *tag, const char *hint,
static int show_failure_hints;
-/* update also docparse/testinfo.pl */
+/* update also doc/conf.py */
static void print_failure_hints(void)
{
print_failure_hint("linux-git", "missing kernel fixes", LINUX_GIT_URL);
--
2.47.2
More information about the ltp
mailing list