doc: pytest: Document the test_efi_loader test
Add this test to the documentation. We need to add a code-block annotation to the example and indent it correctly. We also need to document the do_test_efi_helloworld_net function and that in turn means changing the documentation to test_efi_helloworld_net_http and test_efi_helloworld_net_tftp to reflect what is and isn't done in those functions themselves now. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:

committed by
Heinrich Schuchardt

parent
58b2f0895b
commit
6c3c08c478
@@ -19,5 +19,6 @@ Individual tests
|
||||
|
||||
test_000_version
|
||||
test_bootstage
|
||||
test_efi_loader
|
||||
test_net
|
||||
test_net_boot
|
||||
|
8
doc/develop/pytest/test_efi_loader.rst
Normal file
8
doc/develop/pytest/test_efi_loader.rst
Normal file
@@ -0,0 +1,8 @@
|
||||
test_efi_loader
|
||||
===============
|
||||
|
||||
.. automodule:: test_efi_loader
|
||||
:synopsis:
|
||||
:member-order: bysource
|
||||
:members:
|
||||
:undoc-members:
|
@@ -13,6 +13,8 @@ that rely on network will be automatically skipped.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# Boolean indicating whether the Ethernet device is attached to USB, and hence
|
||||
# USB enumeration needs to be performed prior to network tests.
|
||||
# This variable may be omitted if its value is False.
|
||||
@@ -161,6 +163,11 @@ def fetch_file(ubman, env_conf, proto):
|
||||
return addr
|
||||
|
||||
def do_test_efi_helloworld_net(ubman, proto):
|
||||
"""Download and execute the helloworld appliation
|
||||
|
||||
The helloworld.efi file is downloaded based on the value passed to us as a
|
||||
protocol and is executed using the fallback device tree at $fdtcontroladdr.
|
||||
"""
|
||||
addr = fetch_file(ubman, 'env__efi_loader_helloworld_file', proto)
|
||||
|
||||
output = ubman.run_command('bootefi %x' % addr)
|
||||
@@ -175,8 +182,7 @@ def do_test_efi_helloworld_net(ubman, proto):
|
||||
def test_efi_helloworld_net_tftp(ubman):
|
||||
"""Run the helloworld.efi binary via TFTP.
|
||||
|
||||
The helloworld.efi file is downloaded from the TFTP server and is executed
|
||||
using the fallback device tree at $fdtcontroladdr.
|
||||
Call the do_test_efi_helloworld_net function to execute the test via TFTP.
|
||||
"""
|
||||
|
||||
do_test_efi_helloworld_net(ubman, PROTO_TFTP);
|
||||
@@ -187,8 +193,7 @@ def test_efi_helloworld_net_tftp(ubman):
|
||||
def test_efi_helloworld_net_http(ubman):
|
||||
"""Run the helloworld.efi binary via HTTP.
|
||||
|
||||
The helloworld.efi file is downloaded from the HTTP server and is executed
|
||||
using the fallback device tree at $fdtcontroladdr.
|
||||
Call the do_test_efi_helloworld_net function to execute the test via HTTP.
|
||||
"""
|
||||
if ubman.config.env.get('env__efi_helloworld_net_http_test_skip', True):
|
||||
pytest.skip('helloworld.efi HTTP test is not enabled!')
|
||||
|
Reference in New Issue
Block a user