From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10742 invoked by alias); 13 Jan 2013 08:25:54 -0000 Received: (qmail 10729 invoked by uid 22791); 13 Jan 2013 08:25:53 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 13 Jan 2013 08:25:39 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 746FD1C6D53; Sun, 13 Jan 2013 03:25:38 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8mnxaRqMImIi; Sun, 13 Jan 2013 03:25:38 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C0E451C6D13; Sun, 13 Jan 2013 03:25:37 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 95192C162D; Sun, 13 Jan 2013 12:25:26 +0400 (RET) Date: Sun, 13 Jan 2013 08:25:00 -0000 From: Joel Brobecker To: Andreas Schwab Cc: Paul_Koning@Dell.com, gdb-patches@sourceware.org Subject: Re: [PATCH] Python 3 support, part 2 (testsuite part) Message-ID: <20130113082526.GP6143@adacore.com> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="qGV0fN9tzfkG3CxV" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2013-01/txt/msg00259.txt.bz2 --qGV0fN9tzfkG3CxV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 504 > Running ../../../gdb/gdb/testsuite/gdb.python/py-finish-breakpoint.exp ... > ERROR: tcl error sourcing ../../../gdb/gdb/testsuite/gdb.python/py-finish-breakpoint.exp. > ERROR: can't read "gdb_py_is_py24": no such variable > while executing > "if { $gdb_py_is_py24 == 1 } { Reproduced and fixed thusly. 2013-01-13 Joel Brobecker * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests check. Move $gdb_py_is_py24 value check right after. -- Joel --qGV0fN9tzfkG3CxV Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="py-finish-breakpoint.diff" Content-length: 2170 commit bb9a845e2b13f7b57012775fec078071537bad75 Author: Joel Brobecker Date: Sun Jan 13 12:17:47 2013 +0400 Fix gdb.python/py-finish-breakpoint.exp ERROR. This patch fixes the following error, when running gdb.python/ py-finish-breakpoint.exp: ERROR: can't read "gdb_py_is_py24": no such variable while executing "if { $gdb_py_is_py24 == 1 } { gdb/testsuite/ChangeLog: * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests check. Move $gdb_py_is_py24 value check right after. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f734bbc..e6e4c50 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-01-13 Joel Brobecker + + * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests + check. Move $gdb_py_is_py24 value check right after. + 2013-01-11 Jan Kratochvil * gdb.base/dprintf.exp (dprintf info 1): Fix expectation on 64-bit diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp index 377af73..2a35dc8 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint.exp @@ -23,13 +23,6 @@ if {[skip_shlib_tests]} { load_lib gdb-python.exp -if { $gdb_py_is_py24 == 1 } { - # Python 2.4, 2.5 do not support the "ValueError as e" syntax used in - # the py-finish-breakpoint.py script. - untested py-finish-breakpoint.exp - return 0 -} - set libfile "py-events-shlib" set libsrc $srcdir/$subdir/$libfile.c set lib_sl [standard_output_file $libfile-nodebug.so] @@ -51,6 +44,15 @@ if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" # Start with a fresh gdb. clean_restart ${testfile} +if { [skip_python_tests] } { continue } + +if { $gdb_py_is_py24 == 1 } { + # Python 2.4, 2.5 do not support the "ValueError as e" syntax used in + # the py-finish-breakpoint.py script. + untested py-finish-breakpoint.exp + return 0 +} + set python_file ${srcdir}/${subdir}/${testfile}.py --qGV0fN9tzfkG3CxV--