Skip to content

Commit bcbd8c0

Browse files
committed
docs/devel/testing/functional: Add a section about logging
We should tell the users where to find the log file. While we're at it, also rename the "Overview" heading to a more accurate "Introduction to writing tests" instead. Reported-by: Aditya Gupta <[email protected]> Message-ID: <[email protected]> Reviewed-by: Daniel P. Berrangé <[email protected]> Signed-off-by: Thomas Huth <[email protected]>
1 parent a6836b6 commit bcbd8c0

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

docs/devel/testing/functional.rst

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,26 @@ files around on disk by setting ```QEMU_TEST_KEEP_SCRATCH=1``` as an env
7272
variable. Any preserved files will be deleted the next time the test is run
7373
without this variable set.
7474

75-
Overview
76-
--------
75+
Logging
76+
-------
77+
78+
The framework collects log files for each test in the build directory
79+
in the following subfolder::
80+
81+
<builddir>/tests/functional/<arch>/<fileid>.<classid>.<testname>/
82+
83+
There are usually three log files:
84+
85+
* ``base.log`` contains the generic logging information that is written
86+
by the calls to the logging functions in the test code (e.g. by calling
87+
the ``self.log.info()`` or ``self.log.debug()`` functions).
88+
* ``console.log`` contains the output of the serial console of the guest.
89+
* ``default.log`` contains the output of QEMU. This file could be named
90+
differently if the test chooses to use a different identifier for
91+
the guest VM (e.g. when the test spins up multiple VMs).
92+
93+
Introduction to writing tests
94+
-----------------------------
7795

7896
The ``tests/functional/qemu_test`` directory provides the ``qemu_test``
7997
Python module, containing the ``qemu_test.QemuSystemTest`` class.

0 commit comments

Comments
 (0)