summaryrefslogtreecommitdiff
path: root/doc/usage
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-30 04:47:13 +0300
committerSimon Glass <sjg@chromium.org>2022-11-08 02:24:30 +0300
commitd1b46595700b063faaec3e33f5754642e68b3d8f (patch)
treed63e52f47c82a554fc26f3bcfe5b3d7064532175 /doc/usage
parent6580b618306a24b6ae2974318922c40588ab0284 (diff)
downloadu-boot-d1b46595700b063faaec3e33f5754642e68b3d8f.tar.xz
test: Add a way to detect a test that breaks another
When running unit tests, some may have side effects which cause a subsequent test to break. This can sometimes be seen when using 'ut dm' or similar. Add a new argument which allows a particular (failing) test to be run immediately after a certain number of tests have run. This allows the test causing the failure to be determined. Update the documentation also. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'doc/usage')
-rw-r--r--doc/usage/cmd/ut.rst11
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst
index 11c64a1779..a3039634f2 100644
--- a/doc/usage/cmd/ut.rst
+++ b/doc/usage/cmd/ut.rst
@@ -8,10 +8,12 @@ Synopis
::
- ut [-r<runs>] [-f] [<suite> [<test>]]
+ ut [-r<runs>] [-f] [-I<n>:<one_test>] [<suite> [<test>]]
<runs> Number of times to run each test
-f Force 'manual' tests to run as well
+ <n> Run <one test> after <n> other tests have run
+ <one_test> Name of the 'one' test to run
<suite> Test suite to run, or `all`
<test> Name of single test to run
@@ -35,6 +37,13 @@ Manual tests are normally skipped by this command. Use `-f` to run them. See
See :ref:`develop/tests_writing:mixing python and c` for more information on
manual test.
+When running unit tests, some may have side effects which cause a subsequent
+test to break. This can sometimes be seen when using 'ut dm' or similar. To
+fix this, select the 'one' test which breaks. Then tell the 'ut' command to
+run this one test after a certain number of other tests have run. Using a
+binary search method with `-I` you can quickly figure one which test is causing
+the problem.
+
Generally all tests in the suite are run. To run just a single test from the
suite, provide the <test> argument.