diff options
Diffstat (limited to 'doc/develop')
-rw-r--r-- | doc/develop/bootstd/qfw.rst | 2 | ||||
-rw-r--r-- | doc/develop/ci_testing.rst | 2 | ||||
-rw-r--r-- | doc/develop/index.rst | 2 | ||||
-rw-r--r-- | doc/develop/pytest/index.rst | 27 | ||||
-rw-r--r-- | doc/develop/pytest/test_000_version.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_bind.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_bootmenu.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_bootstage.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_button.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_efi_loader.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_net.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/test_net_boot.rst | 8 | ||||
-rw-r--r-- | doc/develop/pytest/usage.rst (renamed from doc/develop/py_testing.rst) | 12 | ||||
-rw-r--r-- | doc/develop/testing.rst | 4 | ||||
-rw-r--r-- | doc/develop/tests_writing.rst | 2 |
15 files changed, 107 insertions, 8 deletions
diff --git a/doc/develop/bootstd/qfw.rst b/doc/develop/bootstd/qfw.rst index 70086ad1817..fdc3ff71619 100644 --- a/doc/develop/bootstd/qfw.rst +++ b/doc/develop/bootstd/qfw.rst @@ -3,7 +3,7 @@ QFW Bootmeth ============ -`QEMU <hhttps://www.qemu.org/>`_ is a system emulator which is able to boot +`QEMU <https://www.qemu.org/>`_ is a system emulator which is able to boot Operating Systems. QEMU provides specific support for booting an OS image provided on the QEMU command line. diff --git a/doc/develop/ci_testing.rst b/doc/develop/ci_testing.rst index ffaacedc3d8..2033e3447e9 100644 --- a/doc/develop/ci_testing.rst +++ b/doc/develop/ci_testing.rst @@ -18,7 +18,7 @@ be built with mingw to run on Windows. Each of the pipelines is written in such as way as to be a "world build" style test and as such we try and build all possible platforms. In addition, for all platforms that support being run in QEMU we run them in QEMU and use our pytest -suite. See :doc:`py_testing` for more information about those tests. +suite. See :doc:`pytest/usage` for more information about those tests. Azure Pipelines --------------- diff --git a/doc/develop/index.rst b/doc/develop/index.rst index c907f8c9c2c..0c83ef109ab 100644 --- a/doc/develop/index.rst +++ b/doc/develop/index.rst @@ -82,7 +82,7 @@ Testing :maxdepth: 1 testing - py_testing + pytest/index tests_writing tests_sandbox binman_tests diff --git a/doc/develop/pytest/index.rst b/doc/develop/pytest/index.rst new file mode 100644 index 00000000000..0a7c1b21a24 --- /dev/null +++ b/doc/develop/pytest/index.rst @@ -0,0 +1,27 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +pytest Framework within U-Boot +============================== + +General +------- + +.. toctree:: + :maxdepth: 1 + + usage + +Individual tests +---------------- + +.. toctree:: + :maxdepth: 1 + + test_000_version + test_bind + test_bootmenu + test_bootstage + test_button + test_efi_loader + test_net + test_net_boot diff --git a/doc/develop/pytest/test_000_version.rst b/doc/develop/pytest/test_000_version.rst new file mode 100644 index 00000000000..09e9a361729 --- /dev/null +++ b/doc/develop/pytest/test_000_version.rst @@ -0,0 +1,8 @@ +test_000_version +================ + +.. automodule:: test_000_version + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_bind.rst b/doc/develop/pytest/test_bind.rst new file mode 100644 index 00000000000..0f636a9cc5a --- /dev/null +++ b/doc/develop/pytest/test_bind.rst @@ -0,0 +1,8 @@ +test_bind +========= + +.. automodule:: test_bind + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_bootmenu.rst b/doc/develop/pytest/test_bootmenu.rst new file mode 100644 index 00000000000..e2ff5c4c201 --- /dev/null +++ b/doc/develop/pytest/test_bootmenu.rst @@ -0,0 +1,8 @@ +test_bootmenu +============= + +.. automodule:: test_bootmenu + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_bootstage.rst b/doc/develop/pytest/test_bootstage.rst new file mode 100644 index 00000000000..f8f10e96a42 --- /dev/null +++ b/doc/develop/pytest/test_bootstage.rst @@ -0,0 +1,8 @@ +test_bootstage +============== + +.. automodule:: test_bootstage + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_button.rst b/doc/develop/pytest/test_button.rst new file mode 100644 index 00000000000..4e5a29f20a7 --- /dev/null +++ b/doc/develop/pytest/test_button.rst @@ -0,0 +1,8 @@ +test_button +=========== + +.. automodule:: test_button + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_efi_loader.rst b/doc/develop/pytest/test_efi_loader.rst new file mode 100644 index 00000000000..da2fa7e6ec2 --- /dev/null +++ b/doc/develop/pytest/test_efi_loader.rst @@ -0,0 +1,8 @@ +test_efi_loader +=============== + +.. automodule:: test_efi_loader + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_net.rst b/doc/develop/pytest/test_net.rst new file mode 100644 index 00000000000..571179f7b9d --- /dev/null +++ b/doc/develop/pytest/test_net.rst @@ -0,0 +1,8 @@ +test_net +======== + +.. automodule:: test_net + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/pytest/test_net_boot.rst b/doc/develop/pytest/test_net_boot.rst new file mode 100644 index 00000000000..369bd3b809c --- /dev/null +++ b/doc/develop/pytest/test_net_boot.rst @@ -0,0 +1,8 @@ +test_net_boot +============= + +.. automodule:: test_net_boot + :synopsis: + :member-order: bysource + :members: + :undoc-members: diff --git a/doc/develop/py_testing.rst b/doc/develop/pytest/usage.rst index 217ae447035..49d269d66a7 100644 --- a/doc/develop/py_testing.rst +++ b/doc/develop/pytest/usage.rst @@ -13,7 +13,7 @@ results. Advantages of this approach are: U-Boot; there can be no disconnect. - There is no need to write or embed test-related code into U-Boot itself. It is asserted that writing test-related code in Python is simpler and more - flexible than writing it all in C. But see :doc:`tests_writing` for caveats + flexible than writing it all in C. But see :doc:`../tests_writing` for caveats and more discussion / analysis. - It is reasonably simple to interact with U-Boot in this way. @@ -377,7 +377,8 @@ this script again to restore U-Boot to an operational state before running the next test function. This script will likely be implemented by communicating with some form of -relay or electronic switch attached to the board's reset signal. +relay or electronic switch attached to the board's reset signal. Power cycling +is another option. The semantics of this script require that when it is executed, U-Boot will start running from scratch. If the U-Boot binary to be tested has been written @@ -388,6 +389,13 @@ to download the U-Boot binary directly into RAM and execute it. This would avoid the need for `u-boot-test-flash` to actually write U-Boot to flash, thus saving wear on the flash chip(s). +u-boot-test-release +''''''''''''''''''' + +When all tests for the board have been executed, this script is called. + +The board can be switched off now. + Examples '''''''' diff --git a/doc/develop/testing.rst b/doc/develop/testing.rst index 9114d11ad26..aa7786c99fd 100644 --- a/doc/develop/testing.rst +++ b/doc/develop/testing.rst @@ -33,7 +33,7 @@ You can also run a selection tests in parallel with:: make pcheck All of the above use the test/run script with a paremeter to select which tests -are run. See :doc:`py_testing` for more information. +are run. See :doc:`pytest/usage` for more information. Sandbox @@ -69,7 +69,7 @@ build:: ./test/py/test.py --bd sandbox_spl --build -k test_spl -See :doc:`py_testing` for more information about the pytest suite. +See :doc:`pytest/usage` for more information about the pytest suite. See :doc:`tests_sandbox` for how to run tests directly (not through pytest). diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index f6f852c297d..062194659b5 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -376,5 +376,5 @@ An example SPL test is spl_test_load(). Writing Python tests -------------------- -See :doc:`py_testing` for brief notes how to write Python tests. You +See :doc:`pytest/usage` for brief notes how to write Python tests. You should be able to use the existing tests in test/py/tests as examples. |