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 876DAA04DD; Thu, 2 Jan 2020 06:55:48 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 48A3B1BFA2; Thu, 2 Jan 2020 06:55:48 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 98E0B1BFA1 for ; Thu, 2 Jan 2020 06:55:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jan 2020 21:55:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,385,1571727600"; d="scan'208";a="221798416" Received: from dpdk-lihong-ub1604.sh.intel.com ([10.67.118.203]) by orsmga003.jf.intel.com with ESMTP; 01 Jan 2020 21:55:44 -0800 From: lihong To: dts@dpdk.org Cc: lihong Date: Thu, 2 Jan 2020 06:28:43 +0800 Message-Id: <1577917723-7350-1-git-send-email-lihongx.ma@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] framework/project_dpdk: create the base_dir of dpdk if the path not exist 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" Signed-off-by: lihong --- framework/project_dpdk.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index 3a0a449..7ec3aad 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -281,6 +281,10 @@ class DPDKdut(Dut): # ToDo: make this configurable dst_dir = "/tmp/" + out = self.send_expect("ls -d %s" % p_dir, "# ", verify=True) + if out == 2: + self.send_expect("mkdir -p %s" % p_dir, "# ") + out = self.send_expect("ls %s && cd %s" % (dst_dir, p_dir), "#", verify=True) if out == -1: -- 2.7.4