From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EAD73A0562; Thu, 18 Mar 2021 10:31:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 70DCB140F25; Thu, 18 Mar 2021 10:31:16 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id F39EC140F17 for ; Thu, 18 Mar 2021 10:31:14 +0100 (CET) IronPort-SDR: z75ySsd2CUSvqvyeqQwfH2ssGtj7O3jSAbvO3PZfZm8ZFLGGCcceWrE3zDc7q3k994HfO8lXXN T7LBIx6wGxYw== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189731901" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189731901" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:14 -0700 IronPort-SDR: QwB3cNaU4vYOnVBQDVgcIWWDdBP8y7hjptiTOpBoFfTklvvEM8eBiwB9HaDcOgPGJVDAF252BZ M5cPp9Er1O7Q== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="413013382" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:31:13 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: lijuan.tu@intel.com, Haiyang Zhao Date: Thu, 18 Mar 2021 17:22:11 +0800 Message-Id: <20210318092215.27270-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210318092215.27270-1-haiyangx.zhao@intel.com> References: <20210318092215.27270-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V2 1/5] framework/exception: add new exception VerifySkip X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" this new type exeption is used for framework to handle the cases which should be skipped. Signed-off-by: Haiyang Zhao --- framework/exception.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/framework/exception.py b/framework/exception.py index cc2f724b..bdedd743 100644 --- a/framework/exception.py +++ b/framework/exception.py @@ -35,6 +35,19 @@ class VerifyFailure(Exception): return repr(self.value) +class VerifySkip(Exception): + + """ + To be used within the test cases to verify if case should be skipped. + """ + + def __init__(self, value): + self.value = value + + def __str__(self): + return repr(self.value) + + class SSHConnectionException(Exception): """ -- 2.17.1