summaryrefslogtreecommitdiff
path: root/doc/develop
diff options
context:
space:
mode:
Diffstat (limited to 'doc/develop')
-rw-r--r--doc/develop/moveconfig.rst4
-rw-r--r--doc/develop/tests_writing.rst27
2 files changed, 29 insertions, 2 deletions
diff --git a/doc/develop/moveconfig.rst b/doc/develop/moveconfig.rst
index bfb7aff3582..ad8596e6c61 100644
--- a/doc/develop/moveconfig.rst
+++ b/doc/develop/moveconfig.rst
@@ -20,10 +20,10 @@ First, you must edit the Kconfig to add the menu entries for the configs
you are moving.
Then run this tool giving CONFIG names you want to move.
-For example, if you want to move CONFIG_CMD_USB and CONFIG_SYS_TEXT_BASE,
+For example, if you want to move CONFIG_CMD_USB and CONFIG_TEXT_BASE,
simply type as follows::
- $ tools/moveconfig.py CONFIG_CMD_USB CONFIG_SYS_TEXT_BASE
+ $ tools/moveconfig.py CONFIG_CMD_USB CONFIG_TEXT_BASE
The tool walks through all the defconfig files and move the given CONFIGs.
diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst
index 1ddf7a353a7..bb1145da268 100644
--- a/doc/develop/tests_writing.rst
+++ b/doc/develop/tests_writing.rst
@@ -74,6 +74,33 @@ NOT rely on running with sandbox, but instead should function correctly on any
board supported by U-Boot.
+Mixing Python and C
+-------------------
+
+The best of both worlds is sometimes to have a Python test set things up and
+perform some operations, with a 'checker' C unit test doing the checks
+afterwards. This can be achieved with these steps:
+
+- Add the `UT_TESTF_MANUAL` flag to the checker test so that the `ut` command
+ does not run it by default
+- Add a `_norun` suffix to the name so that pytest knows to skip it too
+
+In your Python test use the `-f` flag to the `ut` command to force the checker
+test to run it, e.g.::
+
+ # Do the Python part
+ host load ...
+ bootm ...
+
+ # Run the checker to make sure that everything worked
+ ut -f bootstd vbe_test_fixup_norun
+
+Note that apart from the `UT_TESTF_MANUAL` flag, the code in a 'manual' C test
+is just like any other C test. It still uses ut_assert...() and other such
+constructs, in this case to check that the expected things happened in the
+Python test.
+
+
How slow are Python tests?
--------------------------