Skip to content

Commit ba98e1d

Browse files
committed
New kirk documentation
Use sphinx to generate the kirk documentation. This includes three section as it is for the LTP project, with C API section as well. README is now using the RST format, since it's the default type used by sphinx. Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
1 parent e9e8962 commit ba98e1d

File tree

10 files changed

+311
-184
lines changed

10 files changed

+311
-184
lines changed

README.md

Lines changed: 0 additions & 184 deletions
This file was deleted.

README.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
What is Kirk?
4+
=============
5+
6+
Kirk application is a fork of `runltp-ng <https://github.com/linux-test-project/runltp-ng>`_
7+
and it's the official `LTP <https://github.com/linux-test-project>`_ tests
8+
executor. It provides support for remote testing via Qemu, SSH, LTX, parallel
9+
execution and much more.
10+
11+
.. code-block:: bash
12+
13+
Host information
14+
15+
Hostname: susy
16+
Python: 3.6.15 (default, Sep 23 2021, 15:41:43) [GCC]
17+
Directory: /tmp/kirk.acer/tmp1n8pa6gy
18+
19+
Connecting to SUT: host
20+
21+
Starting suite: math
22+
---------------------
23+
abs01: pass (0.003s)
24+
atof01: pass (0.004s)
25+
float_bessel: pass (1.174s)
26+
float_exp_log: pass (1.423s)
27+
float_iperb: pass (0.504s)
28+
float_power: pass (1.161s)
29+
float_trigo: pass (1.208s)
30+
fptest01: pass (0.006s)
31+
fptest02: pass (0.004s)
32+
nextafter01: pass (0.001s)
33+
34+
Execution time: 5.895s
35+
36+
Suite: math
37+
Total runs: 10
38+
Runtime: 5.488s
39+
Passed: 22
40+
Failed: 0
41+
Skipped: 0
42+
Broken: 0
43+
Warnings: 0
44+
Kernel: Linux 6.4.0-150600.23.50-default
45+
Machine: x86_64
46+
Arch: x86_64
47+
RAM: 15573156 kB
48+
Swap: 2095424 kB
49+
Distro: opensuse-leap 15.6
50+
51+
Disconnecting from SUT: host
52+

doc/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
kirk
2+
html

doc/conf.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
import os
9+
import sys
10+
11+
sys.path.insert(0, os.path.abspath('..'))
12+
13+
project = 'kirk'
14+
copyright = '2025, Linux Test Project'
15+
author = 'Linux Test Project'
16+
17+
# -- General configuration ---------------------------------------------------
18+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
19+
20+
extensions = [
21+
'sphinx.ext.autodoc',
22+
'sphinx.ext.autosummary',
23+
'sphinx.ext.viewcode',
24+
'myst_parser'
25+
]
26+
27+
templates_path = ['_templates']
28+
exclude_patterns = ["html*"]
29+
30+
31+
# -- Options for HTML output -------------------------------------------------
32+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
33+
34+
html_theme = 'sphinx_rtd_theme'
35+
html_static_path = []
36+
37+
38+
def run_apidoc(_):
39+
"""
40+
Autogenerate API documentation.
41+
"""
42+
packages = {
43+
"kirk": "../libkirk",
44+
}
45+
46+
argv_list = []
47+
for output, source in packages.items():
48+
argv_list.append([
49+
"-f",
50+
"-o",
51+
output,
52+
source,
53+
"../libkirk/tests/"
54+
])
55+
56+
try:
57+
# Sphinx 1.7+
58+
from sphinx.ext import apidoc
59+
for argv in argv_list:
60+
apidoc.main(argv)
61+
except ImportError:
62+
# Sphinx 1.6 (and earlier)
63+
from sphinx import apidoc
64+
for argv in argv_list:
65+
argv.insert(0, apidoc.__file__)
66+
apidoc.main(argv)
67+
68+
69+
def setup(app):
70+
app.connect('builder-inited', run_apidoc)

doc/developers/framework.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
Implementing a new Framework
4+
============================
5+
6+
Every testing framework has its own setup, defining tests folders, data, and
7+
variables. For this reason, the `Framework` class provides a generic API that,
8+
once implemented, allows you to define a specific testing framework.
9+
10+
The class implementation must be included inside the `libkirk` folder and will
11+
be used as an abstraction layer between the `kirk` scheduler and the specific
12+
testing framewiork.

doc/developers/sut.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. SPDX-License-Identifier: GPL-2.0-or-later
2+
3+
Implementing a new SUT
4+
======================
5+
6+
Sometimes we need to cover complex testing scenarios, where the SUT
7+
(System Under Test) uses particular protocols and infrastructures to
8+
communicate with our host machine and execute test binaries.
9+
10+
For this reason, `kirk` provides a plugin system to recognize custom SUT class
11+
implementations inside the `libkirk` folder. Please check the `host.py` or
12+
`ssh.py` implementations for more details.
13+
14+
Once a new SUT class is implemented and placed inside the `libkirk` folder, you
15+
can use the following command to see if the application correctly recognizes it:
16+
17+
.. code-block:: bash
18+
19+
kirk -s help
20+

0 commit comments

Comments
 (0)