Some tests have a very long runtime and might run into timeout
issues e.g. when QEMU has been compiled with --enable-debug.
Add a decorator for marking them more easily and document the
corresponding environment variable that is used to enable the
tests.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
docs/devel/testing/functional.rst | 8 ++++++++
tests/functional/qemu_test/__init__.py | 2 +-
tests/functional/qemu_test/decorators.py | 14 ++++++++++++++
tests/functional/test_arm_quanta_gsj.py | 5 +++--
4 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/docs/devel/testing/functional.rst
b/docs/devel/testing/functional.rst
index ae238ed3fc..7d9396b696 100644
--- a/docs/devel/testing/functional.rst
+++ b/docs/devel/testing/functional.rst
@@ -351,5 +351,13 @@ the code snippet below:
Tests should not live in this state forever and should either be fixed
or eventually removed.
+QEMU_TEST_TIMEOUT_EXPECTED
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+Tests that have a very long runtime and might run into timeout issues
+e.g. if the QEMU binary has been compiled with debugging options enabled.
+To avoid these timeout issues by default and to save some precious CPU
+cycles during normal testing, such tests are disabled by default unless
+the QEMU_TEST_TIMEOUT_EXPECTED environment variable has been set.
+
.. _unittest: https://docs.python.org/3/library/unittest.html
diff --git a/tests/functional/qemu_test/__init__.py
b/tests/functional/qemu_test/__init__.py
index da1830286d..b1a19d2a4b 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -14,7 +14,7 @@
from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
from .linuxkernel import LinuxKernelTest
from .decorators import skipIfMissingCommands, skipIfNotMachine, \
- skipFlakyTest, skipUntrustedTest, skipBigDataTest, \
+ skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipLongRuntime, \