From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0DEFA0527; Fri, 27 Nov 2020 03:56:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AC098CAA2; Fri, 27 Nov 2020 03:56:52 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8F23CCA9D for ; Fri, 27 Nov 2020 03:56:49 +0100 (CET) IronPort-SDR: hG9gI9jg2WmFTNwbLOPoBGFEKbW5Xt8LBr3QL24iNhTrMjXGIeBiWikvvBEIETqOBgSkgSlPy9 UQxFXIy8AyXQ== X-IronPort-AV: E=McAfee;i="6000,8403,9817"; a="233947101" X-IronPort-AV: E=Sophos;i="5.78,373,1599548400"; d="scan'208";a="233947101" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 18:56:47 -0800 IronPort-SDR: 4CcB0v28vsyzoJChUtp0vvuNZgIiFj6mZGdeqE3JdNUhMbXM0tuwwDzwPIoTYe6jV0X+ek6+QJ DlkwfHSlrRTw== X-IronPort-AV: E=Sophos;i="5.78,373,1599548400"; d="scan'208";a="313557292" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2020 18:56:46 -0800 From: Haiyang Zhao To: Lijuan.Tu@intel.com, dts@dpdk.org Cc: Haiyang Zhao Date: Fri, 27 Nov 2020 10:50:23 +0800 Message-Id: <20201127025029.22276-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201127025029.22276-1-haiyangx.zhao@intel.com> References: <20201127025029.22276-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 1/7] framework/dut: record DPDK version in host DUT 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: , Errors-To: dts-bounces@dpdk.org Sender: "dts" get dpdk version from VERSION and save it in host dut. Signed-off-by: Haiyang Zhao --- framework/dut.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/framework/dut.py b/framework/dut.py index 2863848..f3ef8c6 100644 --- a/framework/dut.py +++ b/framework/dut.py @@ -80,6 +80,7 @@ class Dut(Crb): self.hugepage_path = None self.apps_name_conf = {} self.apps_name = {} + self.dpdk_version = '' def filter_cores_from_crb_cfg(self): # get core list from crbs.cfg @@ -368,7 +369,13 @@ class Dut(Crb): Then call pci scan function to collect nic device information. At last setup DUT' environment for validation. """ - self.send_expect("cd %s" % self.base_dir, "# ") + out = self.send_expect("cd %s" % self.base_dir, "# ") + assert 'No such file or directory' not in out, "Can't switch to dpdk folder!!!" + out = self.send_expect("cat VERSION", "# ") + if 'No such file or directory' in out: + self.logger.error("Can't get DPDK version due to VERSION not exist!!!") + else: + self.dpdk_version = out self.send_expect("alias ls='ls --color=none'", "#") if self.get_os_type() == 'freebsd': -- 2.17.1