Skip to content

Commit

Permalink
doc: Document the pytest-random-order changes to topotests
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Jul 31, 2024
1 parent 4c812c7 commit 3cdeef0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions doc/developer/topotests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,28 @@ IDE/editor if supported (e.g., the emacs ``cov-mode`` package)
NOTE: the *.gcda files in ``/tmp/topotests/gcda`` are cumulative so if you do
not remove them they will aggregate data across multiple topotest runs.
How to run tests in a random order
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To introduce additional randomness in the call order you can install the
pytest-random-order module.

.. code:: console
pip3 install pytest-random-order
Then when you run the tests, add this to the command line:

.. code:: console
sudo -E python3 -m pytest -n <some value> --dist=loadfile --random-order=package
This causes the tests to be run in a random order. The run of the test will give
you the seed for the random order so you can use that to specify a repeat run
if you can cause a specific test to fail more often. Consult the pytest-random-order
documentation for how to do this.


How to reproduce failed Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 3cdeef0

Please sign in to comment.