From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH 3/3] Fix py-parameter.exp for remote host
Date: Wed, 17 Sep 2014 12:21:00 -0000 [thread overview]
Message-ID: <1410956225-12592-4-git-send-email-yao@codesourcery.com> (raw)
In-Reply-To: <1410956225-12592-1-git-send-email-yao@codesourcery.com>
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 <yao@codesourcery.com>
* 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" \
--
1.9.3
next prev parent reply other threads:[~2014-09-17 12:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 12:21 [PATCH 0/3] Fix gdb.python tests fails on " Yao Qi
2014-09-17 12:21 ` [PATCH 2/3] Fix file name matching " Yao Qi
2014-10-15 7:35 ` Yao Qi
2014-09-17 12:21 ` [PATCH 1/3] Clean up gdb.python/ tests Yao Qi
2014-09-17 17:33 ` Sergio Durigan Junior
2014-09-17 12:21 ` Yao Qi [this message]
2014-09-24 13:11 ` [PATCH 0/3] Fix gdb.python tests fails on remote host Yao Qi
2014-10-07 13:58 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410956225-12592-4-git-send-email-yao@codesourcery.com \
--to=yao@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox