From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id C5A3A58D6 for ; Tue, 25 Oct 2016 08:46:33 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP; 24 Oct 2016 23:46:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,545,1473145200"; d="scan'208";a="1058682056" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 24 Oct 2016 23:46:32 -0700 From: "xu,gang" To: dts@dpdk.org Cc: "xu,gang" Date: Tue, 25 Oct 2016 14:47:58 +0800 Message-Id: <1477378078-2865-1-git-send-email-gangx.xu@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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: Tue, 25 Oct 2016 06:46:34 -0000 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) -- 1.9.3