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 CC0B2A04DD; Thu, 2 Jan 2020 06:56:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BEBAE1BFA2; Thu, 2 Jan 2020 06:56:50 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id D05341BFA1 for ; Thu, 2 Jan 2020 06:56:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jan 2020 21:56:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,385,1571727600"; d="scan'208";a="209699157" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga007.jf.intel.com with ESMTP; 01 Jan 2020 21:56:48 -0800 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jan 2020 21:56:48 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 1 Jan 2020 21:56:48 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.203]) with mapi id 14.03.0439.000; Thu, 2 Jan 2020 13:56:46 +0800 From: "Ma, LihongX" To: "dts@dpdk.org" Thread-Topic: [dts][PATCH V1] framework/project_dpdk: create the base_dir of dpdk if the path not exist Thread-Index: AQHVwTFNuW6E+XFEXUOmWsAqYsjT06fW4FuQ Date: Thu, 2 Jan 2020 05:56:45 +0000 Message-ID: References: <1577917723-7350-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1577917723-7350-1-git-send-email-lihongx.ma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Tested-by: ma,lihong -----Original Message----- From: Ma, LihongX=20 Sent: Thursday, January 2, 2020 6:29 AM To: dts@dpdk.org Cc: Ma, LihongX Subject: [dts][PATCH V1] framework/project_dpdk: create the base_dir of dpd= k if the path not exist 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 3a= 0a449..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 =3D "/tmp/" =20 + out =3D self.send_expect("ls -d %s" % p_dir, "# ", verify=3DTr= ue) + if out =3D=3D 2: + self.send_expect("mkdir -p %s" % p_dir, "# ") + out =3D self.send_expect("ls %s && cd %s" % (dst_dir, p_dir), "#", verify=3DTrue) if out =3D=3D -1: -- 2.7.4