doc: Tidy up the hooks documentation

Now that these files are within the repo, link the documentation to the
normal U-Boot documentation. Update directory paths and convert it to
rST format.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-05-01 08:01:38 -06:00
parent f60242a69d
commit e9f7a83074
3 changed files with 54 additions and 41 deletions

View File

@@ -314,6 +314,8 @@ via `$PATH`. These scripts implement certain actions on behalf of the test
suite. This keeps the test suite simple and isolated from system variances
unrelated to U-Boot features.
For more details see :doc:`test_hooks`.
Hook scripts
~~~~~~~~~~~~
@@ -404,9 +406,9 @@ saving wear on the flash chip(s).
Examples
''''''''
https://source.denx.de/u-boot/u-boot-test-hooks contains some working example hook
The directory `test/hooks` contains some working example hook
scripts, and may be useful as a reference when implementing hook scripts for
your platform. These scripts are not considered part of U-Boot itself.
your platform. These scripts are considered part of U-Boot itself.
Board-type-specific configuration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -469,16 +471,16 @@ instances of:
Complete invocation example
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assuming that you have installed the hook scripts into $HOME/ubtest/bin, and
any required environment configuration Python modules into $HOME/ubtest/py,
then you would likely invoke the test script as follows:
Assuming that you have installed U-Boot `$UBOOT`, any new hooks into
`$UBOOT/test/hooks/bin` and any new configuration Python modules into
`$UBOOT/test/hooks/py`, then you would likely invoke the test script as follows:
If U-Boot has already been built:
.. code-block:: bash
PATH=$HOME/ubtest/bin:$PATH \
PYTHONPATH=${HOME}/ubtest/py/${HOSTNAME}:${PYTHONPATH} \
PATH=$UBOOT/test/hooks/bin:$PATH \
PYTHONPATH=$UBOOT/test/hooks/py/${HOSTNAME}:${PYTHONPATH} \
./test/py/test.py --bd seaboard
If you want the test script to compile U-Boot for you too, then you likely
@@ -488,7 +490,7 @@ follows:
.. code-block:: bash
CROSS_COMPILE=arm-none-eabi- \
PATH=$HOME/ubtest/bin:$PATH \
PATH=$UBOOT/test/hooks/bin:$PATH \
PYTHONPATH=${HOME}/ubtest/py/${HOSTNAME}:${PYTHONPATH} \
./test/py/test.py --bd seaboard --build
@@ -496,8 +498,8 @@ or, using buildman to handle it:
.. code-block:: bash
PATH=$HOME/ubtest/bin:$PATH \
PYTHONPATH=${HOME}/ubtest/py/${HOSTNAME}:${PYTHONPATH} \
PATH=$UBOOT/test/hooks/bin:$PATH \
PYTHONPATH=$UBOOT/test/hooks/py/${HOSTNAME}:${PYTHONPATH} \
./test/py/test.py --bd seaboard --build --buildman
Writing tests