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 495D3A054F; Wed, 17 Mar 2021 08:25:39 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C6F70242B2B; Wed, 17 Mar 2021 08:25:38 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 372E74014D for ; Wed, 17 Mar 2021 08:25:38 +0100 (CET) IronPort-SDR: S+Cs4B/CFkg8dGAN9SBq5CbPIv20JFKuswlHCyaVqZjrs65o6/l2cOsgLZUsZsSC7kffRd3sAm lDT+30+rRzvw== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="209369035" X-IronPort-AV: E=Sophos;i="5.81,255,1610438400"; d="scan'208";a="209369035" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 00:25:37 -0700 IronPort-SDR: ESm4O72eyQeNvPADXhV7wYaFlPigZxNNq6b0eEKgVEl0pFcLhXC9NNJ3CfqO0bvhI+ld1PMSXj v+LOSVpFZYXg== X-IronPort-AV: E=Sophos;i="5.81,255,1610438400"; d="scan'208";a="405829285" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 00:25:36 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Lijuan.Tu@intel.com, Haiyang Zhao Date: Wed, 17 Mar 2021 15:16:21 +0800 Message-Id: <20210317071625.13041-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210317071625.13041-1-haiyangx.zhao@intel.com> References: <20210317071625.13041-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 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