From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 1BAA099FA for ; Tue, 1 Aug 2017 08:30:54 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP; 31 Jul 2017 23:30:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,305,1498546800"; d="scan'208";a="1201338845" Received: from dpdk-test38.sh.intel.com ([10.67.111.97]) by fmsmga002.fm.intel.com with ESMTP; 31 Jul 2017 23:30:40 -0700 From: Marvin Liu To: dts@dpdk.org Cc: Marvin Liu Date: Tue, 1 Aug 2017 02:28:24 -0400 Message-Id: <1501568904-49479-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [dts] [PATCH v1] framework test_case: load configuration for suite X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2017 06:30:55 -0000 Suite level configuration will be loaded after initialization. Allow suite to retrieve suite level configurations before case execution. Signed-off-by: Marvin Liu diff --git a/framework/test_case.py b/framework/test_case.py index 9eed14d..ec2032f 100644 --- a/framework/test_case.py +++ b/framework/test_case.py @@ -118,6 +118,10 @@ class TestCase(object): # create rst format report for this suite self._rst_obj = RstReport('rst_report', target, self.nic, self.suite_name, self._enable_perf) + # load suite configuration + self._suite_conf = SuiteConf(self.suite_name) + self._suite_cfg = self._suite_conf.suite_cfg + def init_log(self): # get log handler class_name = self.__class__.__name__ @@ -260,6 +264,7 @@ class TestCase(object): # load suite configuration file here for rerun command self._suite_conf = SuiteConf(self.suite_name) + self._suite_cfg = self._suite_conf.suite_cfg self._case_cfg = self._suite_conf.load_case_config(case_name) del(self._suite_conf) @@ -377,6 +382,12 @@ class TestCase(object): """ return self._case_cfg + def get_suite_cfg(self): + """ + Return suite based configuration + """ + return self._suite_cfg + def execute_tear_downall(self): """ execute suite tear_down_all function -- 1.9.3