test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ke Xu <ke1.xu@intel.com>
To: dts@dpdk.org
Cc: ke1.xu@intel.com, tarcadia@qq.com
Subject: [DTS][Patch V1 3/4] framework/test_case: Add skip_unsupported decorator.
Date: Wed, 12 Jul 2023 19:31:25 +0000	[thread overview]
Message-ID: <20230712193126.1994361-4-ke1.xu@intel.com> (raw)
In-Reply-To: <20230712193126.1994361-1-ke1.xu@intel.com>

Add a new decorator for marking unsupported cases.

Signed-off-by: Ke Xu <ke1.xu@intel.com>
---
 framework/test_case.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/framework/test_case.py b/framework/test_case.py
index 68f89407..35342de0 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -628,3 +628,24 @@ def skip_unsupported_host_driver(drivers):
         return wrapper
 
     return decorator
+
+
+def skip_unsupported(do_skip: bool = True, reason: str = None):
+    """
+    Skip case which are not supported. This means a case may be supported in future or in other branches.
+    """
+
+    def decorator(func):
+        @wraps(func)
+        def wrapper(*args, **kwargs):
+            test_case = args[0]
+            if do_skip:
+                raise VerifySkip(
+                    "DPDK currently do not support this case"
+                    + (" for %s" % reason if reason else "")
+                )
+            return func(*args, **kwargs)
+
+        return wrapper
+
+    return decorator
-- 
2.34.1


  parent reply	other threads:[~2023-07-12 19:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 19:31 [DTS][Patch V1 0/4] Updating packet module and introducing a new common module Ke Xu
2023-07-12 19:31 ` [DTS][Patch V1 1/4] framework/packet: Add GTPU and GENEVE support for packet module Ke Xu
2023-07-12 19:31 ` [DTS][Patch V1 2/4] framework/packet: Update packet module for new methods Ke Xu
2023-07-12 19:31 ` Ke Xu [this message]
2023-07-12 19:31 ` [DTS][Patch V1 4/4] tests/offload_common: Add offload_common module Ke Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230712193126.1994361-4-ke1.xu@intel.com \
    --to=ke1.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=tarcadia@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).