qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 06/31] tests/functional: introduce some helpful decorators


From: Thomas Huth
Subject: Re: [PATCH v2 06/31] tests/functional: introduce some helpful decorators
Date: Thu, 12 Dec 2024 08:01:40 +0100
User-agent: Mozilla Thunderbird

On 11/12/2024 18.26, Daniel P. Berrangé wrote:
Reduce repeated boilerplate with some helper decorators:

  @skipIfNotPlatform("x86_64", "aarch64")

   => Skip unless the build host platform matches

  @skipIfMissingCommands("mkisofs", "losetup")

   => Skips unless all listed commands are found in $PATH

  @skipIfMissingImports("numpy", "cv2")

   => Skips unless all listed modules can be imported

  @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/issues/NNN";)

   => Skips unless env var requests flaky tests with the
      reason documented in the referenced gitlab bug

  @skipBigData

   => Skips unless env var permits tests creating big data files

  @skipUntrustedTest

   => Skips unless env var permits tests which are potentially
      dangerous to the host

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
  tests/functional/qemu_test/__init__.py   |   3 +
  tests/functional/qemu_test/decorators.py | 107 +++++++++++++++++++++++
  2 files changed, 110 insertions(+)
  create mode 100644 tests/functional/qemu_test/decorators.py

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]