summary refs log tree commit diff stats
path: root/tests/functional/qemu_test/__init__.py
diff options
context:
space:
mode:
authorGustavo Romero <gustavo.romero@linaro.org>2025-10-03 14:18:18 +0000
committerAlex Bennée <alex.bennee@linaro.org>2025-10-07 07:33:40 +0100
commitfb8f35949384c3a00ef56528cb43e851c95268e6 (patch)
tree80404141d7b18697b4cc499d0be19107ca72ea35 /tests/functional/qemu_test/__init__.py
parentdb205774d1b2dc8e3a0e925f090a5b2f59b9bb70 (diff)
downloadfocaccia-qemu-fb8f35949384c3a00ef56528cb43e851c95268e6.tar.gz
focaccia-qemu-fb8f35949384c3a00ef56528cb43e851c95268e6.zip
tests/functional: Add decorator to skip test on missing env vars
Add a decorator to skip tests on missing env variable(s). Multiple
variable names can be provided and if one or more of them are not set in
the test environment the test is skipped and the missing vars are
printed out.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Message-ID: <20251003141820.85278-8-gustavo.romero@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'tests/functional/qemu_test/__init__.py')
-rw-r--r--tests/functional/qemu_test/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/functional/qemu_test/__init__.py b/tests/functional/qemu_test/__init__.py
index 60d19891bf..320193591b 100644
--- a/tests/functional/qemu_test/__init__.py
+++ b/tests/functional/qemu_test/__init__.py
@@ -15,7 +15,8 @@ from .testcase import QemuBaseTest, QemuUserTest, QemuSystemTest
 from .linuxkernel import LinuxKernelTest
 from .decorators import skipIfMissingCommands, skipIfNotMachine, \
     skipFlakyTest, skipUntrustedTest, skipBigDataTest, skipSlowTest, \
-    skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest
+    skipIfMissingImports, skipIfOperatingSystem, skipLockedMemoryTest, \
+    skipIfMissingEnv
 from .archive import archive_extract
 from .uncompress import uncompress
 from .gdb import GDB