From: <Paul_Koning@Dell.com>
To: <tromey@redhat.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Python 3 support, part 2 (testsuite part)
Date: Mon, 10 Dec 2012 21:09:00 -0000 [thread overview]
Message-ID: <C75A84166056C94F84D238A44AF9F6AD2CF7D4@AUSX10MPC103.AMER.DELL.COM> (raw)
In-Reply-To: <87vcd5tkc0.fsf@fleche.redhat.com>
On Nov 16, 2012, at 2:32 PM, Tom Tromey wrote:
>>>>>> "Paul" == <Paul_Koning@Dell.com> writes:
>
> Paul> Most of the changes are for turning "print" from a statement into
> Paul> a function call. There are also some changes to handle the fact
> Paul> that "str" is now Unicode and the separate "unicode" type is gone,
> Paul> similarly "int" is now long integer and "long" is gone.
>
> In the future, please split up patches like this.
> The patch in its present form is difficult to read.
> For example, all the "print" changes are obvious -- as a separate patch
> those could get a simple "ok" without much fuss.
>
> Paul> Ok to commit?
>
> Yes, thanks.
>
> Tom
Sorry for the long delay... I looked more closely at my test results and noticed an error I had overlooked. It was not correctly setting the gdb_py_is_py3k and gdb_py_is_py24 variables. The correction for that error changes testsuite/lib/gdb.exp -- all the other the testsuite changes are unaffected. Attached is the updated diff for that file.
Ok with that correction?
paul
Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.223
diff -u -r1.223 gdb.exp
--- gdb/testsuite/lib/gdb.exp 26 Nov 2012 19:23:56 -0000 1.223
+++ gdb/testsuite/lib/gdb.exp 10 Dec 2012 16:56:36 -0000
@@ -1550,7 +1550,10 @@
proc skip_python_tests {} {
global gdb_prompt
- gdb_test_multiple "python print 'test'" "verify python support" {
+ global gdb_py_is_py3k
+ global gdb_py_is_py24
+
+ gdb_test_multiple "python print ('test')" "verify python support" {
-re "not supported.*$gdb_prompt $" {
unsupported "Python support is disabled."
return 1
@@ -1558,6 +1561,26 @@
-re "$gdb_prompt $" {}
}
+ set gdb_py_is_py24 0
+ gdb_test_multiple "python print (sys.version_info\[0\])" "check if python 3" {
+ -re "3.*$gdb_prompt $" {
+ set gdb_py_is_py3k 1
+ }
+ -re ".*$gdb_prompt $" {
+ set gdb_py_is_py3k 0
+ }
+ }
+ if { $gdb_py_is_py3k == 0 } {
+ gdb_test_multiple "python print (sys.version_info\[1\])" "check if python 2.4" {
+ -re "\[45\].*$gdb_prompt $" {
+ set gdb_py_is_py24 1
+ }
+ -re ".*$gdb_prompt $" {
+ set gdb_py_is_py24 0
+ }
+ }
+ }
+
return 0
}
next prev parent reply other threads:[~2012-12-10 21:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-12 16:11 Paul_Koning
2012-11-16 19:32 ` Tom Tromey
2012-11-19 15:34 ` Paul_Koning
2012-12-10 21:09 ` Paul_Koning [this message]
2012-12-10 21:13 ` Tom Tromey
2012-12-10 21:22 ` Paul_Koning
2012-12-26 23:48 ` Andreas Schwab
2013-01-13 8:25 ` Joel Brobecker
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=C75A84166056C94F84D238A44AF9F6AD2CF7D4@AUSX10MPC103.AMER.DELL.COM \
--to=paul_koning@dell.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/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