tests/functional: Add a decorator for skipping long running tests

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. Rename the corresponding environment
variable to be more in sync with the other QEMU_TEST_ALLOW_* switches
that we already have, and add a paragraph about it in the documentation.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250128152839.184599-2-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
Thomas Huth 2025-01-28 16:28:35 +01:00
parent fc9fea48be
commit 4ae633b012
6 changed files with 31 additions and 13 deletions

View file

@ -7,8 +7,8 @@
import os
from qemu_test import LinuxKernelTest, Asset, exec_command_and_wait_for_pattern
from qemu_test import interrupt_interactive_console_until_pattern
from unittest import skipUnless
from qemu_test import interrupt_interactive_console_until_pattern, skipSlowTest
class EmcraftSf2Machine(LinuxKernelTest):
@ -32,7 +32,7 @@ class EmcraftSf2Machine(LinuxKernelTest):
'20200711-gsj-qemu-0/nuvoton-npcm730-gsj.dtb'),
'3249b2da787d4b9ad4e61f315b160abfceb87b5e1895a7ce898ce7f40c8d4045')
@skipUnless(os.getenv('QEMU_TEST_TIMEOUT_EXPECTED'), 'Test might timeout')
@skipSlowTest()
def test_arm_quanta_gsj(self):
self.set_machine('quanta-gsj')
image_path = self.uncompress(self.ASSET_IMAGE, format='gz')