From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16170 invoked by alias); 10 Dec 2012 21:09:35 -0000 Received: (qmail 16156 invoked by uid 22791); 10 Dec 2012 21:09:33 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 10 Dec 2012 21:09:28 +0000 X-LoopCount0: from 10.170.28.39 From: To: CC: Subject: Re: [PATCH] Python 3 support, part 2 (testsuite part) Date: Mon, 10 Dec 2012 21:09:00 -0000 Message-ID: References: <87vcd5tkc0.fsf@fleche.redhat.com> In-Reply-To: <87vcd5tkc0.fsf@fleche.redhat.com> Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-12/txt/msg00285.txt.bz2 On Nov 16, 2012, at 2:32 PM, Tom Tromey wrote: >>>>>> "Paul" =3D=3D writes: >=20 > 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. >=20 > 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. >=20 > Paul> Ok to commit? >=20 > Yes, thanks. >=20 > Tom Sorry for the long delay... I looked more closely at my test results and no= ticed an error I had overlooked. It was not correctly setting the gdb_py_i= s_py3k and gdb_py_is_py24 variables. The correction for that error changes= testsuite/lib/gdb.exp -- all the other the testsuite changes are unaffecte= d. Attached is the updated diff for that file. Ok with that correction? paul Index: gdb/testsuite/lib/gdb.exp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 @@ =20 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 $" {} } =20 + set gdb_py_is_py24 0 + gdb_test_multiple "python print (sys.version_info\[0\])" "check if pyt= hon 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 =3D=3D 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 }