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 8B77AA034F; Wed, 31 Mar 2021 04:30:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AE5E4069E; Wed, 31 Mar 2021 04:30:55 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8C3FC40141 for ; Wed, 31 Mar 2021 04:30:53 +0200 (CEST) IronPort-SDR: vQBpcp8WjQTZYC1Ep7MiFSZow+6Fcxoq4pcUR18isHNGb79tAUXMj+y7Vcp0rjfWSeI+59grMw 6B6QiOsKKrYQ== X-IronPort-AV: E=McAfee;i="6000,8403,9939"; a="191927917" X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="191927917" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 19:30:50 -0700 IronPort-SDR: VnLST9lqzx+TVUo/Ju2u5dFhXOoNeZdxAh4c1dfVi1LtBwTVfVZWT1jh3X4cjCyUNIE0EAz153 PHQ+XxY2biWw== X-IronPort-AV: E=Sophos;i="5.81,291,1610438400"; d="scan'208";a="610317505" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 19:30:45 -0700 From: Haiyang Zhao To: dts@dpdk.org Cc: Haiyang Zhao Date: Wed, 31 Mar 2021 10:21:36 +0800 Message-Id: <20210331022136.21576-1-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] framework/test_result: fix saving result failed 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" when execution.cfg has multiple sections and the drivername is different, the test result of the second drivername will not be recorded, fix it by adding judgement. Signed-off-by: Haiyang Zhao --- framework/test_result.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/framework/test_result.py b/framework/test_result.py index 6dd94451..77fe8f00 100644 --- a/framework/test_result.py +++ b/framework/test_result.py @@ -169,12 +169,20 @@ class Result(object): except: return '' - def __set_driver(self, package): - if package not in self.internals[self.__dut + 1]: - self.internals[self.__dut + 1].append(package) + def __set_driver(self, driver): + if driver not in self.internals[self.__dut + 1]: + driver_current = self.__get_driver() + if driver_current: + if driver not in driver_current: + self.internals[self.__dut + 1][3] = driver_current + '/' + driver + else: + self.internals[self.__dut + 1].append(driver) def __get_driver(self): - return self.internals[self.__dut + 1][3] + try: + return self.internals[self.__dut + 1][3] + except: + return '' def __current_targets(self): return self.internals[self.__dut + 1] -- 2.17.1