From patchwork Wed Sep 17 12:17:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 2882 Received: (qmail 27908 invoked by alias); 17 Sep 2014 12:21:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 27824 invoked by uid 89); 17 Sep 2014 12:21:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Sep 2014 12:21:43 +0000 Received: from svr-orw-fem-02x.mgc.mentorg.com ([147.34.96.206] helo=SVR-ORW-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XUEEu-0004Sb-M8 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Wed, 17 Sep 2014 05:21:40 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.3.181.6; Wed, 17 Sep 2014 05:21:40 -0700 From: Yao Qi To: Subject: [PATCH 3/3] Fix py-parameter.exp for remote host Date: Wed, 17 Sep 2014 20:17:05 +0800 Message-ID: <1410956225-12592-4-git-send-email-yao@codesourcery.com> In-Reply-To: <1410956225-12592-1-git-send-email-yao@codesourcery.com> References: <1410956225-12592-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes Test gdb.python/py-parameter.exp expects output "$srcdir/$subdir:\$cdir:\$cwd", but proc gdb_reinitialize_dir doesn't set $srcdir/$subdir in search directories on remote host because it doesn't exist on remote host. proc gdb_reinitialize_dir { subdir } { global gdb_prompt if [is_remote host] { return "" } It causes the fail below: (gdb) python print (gdb.parameter ('directories'))^M /tmp/gdb:$cdir:$cwd^M (gdb) FAIL: gdb.python/py-parameter.exp: python print (gdb.parameter ('directories')) This patch is to fix this fail by not matching $srcdir/$subdir on remote host. gdb/testsuite: 2014-09-17 Yao Qi * gdb.python/py-parameter.exp: Don't match $srcdir/$subdir on remote host. --- gdb/testsuite/gdb.python/py-parameter.exp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.python/py-parameter.exp b/gdb/testsuite/gdb.python/py-parameter.exp index 8bc122f..36c109d 100644 --- a/gdb/testsuite/gdb.python/py-parameter.exp +++ b/gdb/testsuite/gdb.python/py-parameter.exp @@ -27,7 +27,14 @@ gdb_reinitialize_dir $srcdir/$subdir if { [skip_python_tests] } { continue } # We use "." here instead of ":" so that this works on win32 too. -gdb_test "python print (gdb.parameter ('directories'))" "$srcdir/$subdir.\\\$cdir.\\\$cwd" +if { [is_remote host] } { + # Don't match $srcdir/$subdir because proc gdb_reinitialize_dir + # doesn't set search directories on remote host. + set directories ".*\\\$cdir.\\\$cwd" +} else { + set directories "$srcdir/$subdir.\\\$cdir.\\\$cwd" +} +gdb_test "python print (gdb.parameter ('directories'))" $directories # Test a simple boolean parameter. gdb_py_test_multiple "Simple gdb booleanparameter" \