From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1269729CB for ; Wed, 26 Oct 2016 09:40:28 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP; 26 Oct 2016 00:40:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,549,1473145200"; d="scan'208";a="777825516" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by FMSMGA003.fm.intel.com with ESMTP; 26 Oct 2016 00:40:22 -0700 Message-ID: <58105E19.1080409@intel.com> Date: Wed, 26 Oct 2016 15:41:13 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "xu,gang" , dts@dpdk.org References: <1477378078-2865-1-git-send-email-gangx.xu@intel.com> In-Reply-To: <1477378078-2865-1-git-send-email-gangx.xu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH V2] fix scp error on FreeBSD 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: Wed, 26 Oct 2016 07:40:29 -0000 Thanks, gang. Applied. On 10/25/2016 02:47 PM, xu,gang wrote: > when scp something to FreeBSD the prompt is different with other > ex:FreeBSD is "Password for root@freeBSD:" > Fedora is "root@xx.xxx.xxx.xxx's password:" > > > Signed-off-by: xu,gang > --- > framework/ssh_pexpect.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/framework/ssh_pexpect.py b/framework/ssh_pexpect.py > index 1abf8a1..9668daf 100644 > --- a/framework/ssh_pexpect.py > +++ b/framework/ssh_pexpect.py > @@ -176,11 +176,11 @@ class SSHPexpect(object): > p = pexpect.spawn(scp_cmd) > time.sleep(0.5) > ssh_newkey = 'Are you sure you want to continue connecting' > - i = p.expect([ssh_newkey, 'password: ', "# ", pexpect.EOF, > + i = p.expect([ssh_newkey, '[pP]ssword', "# ", pexpect.EOF, > pexpect.TIMEOUT], 120) > if i == 0: # add once in trust list > p.sendline('yes') > - i = p.expect([ssh_newkey, '[pP]assword: ', pexpect.EOF], 2) > + i = p.expect([ssh_newkey, '[pP]ssword', pexpect.EOF], 2) > > if i == 1: > time.sleep(0.5)