diff options
author | Simon Glass <sjg@chromium.org> | 2022-10-29 19:47:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-11-07 16:24:30 -0700 |
commit | d1b46595700b063faaec3e33f5754642e68b3d8f (patch) | |
tree | d63e52f47c82a554fc26f3bcfe5b3d7064532175 /doc/usage | |
parent | 6580b618306a24b6ae2974318922c40588ab0284 (diff) | |
download | u-boot-d1b46595700b063faaec3e33f5754642e68b3d8f.tar.gz |
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.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst index 11c64a17793..a3039634f2e 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. |