Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Andreas Schwab <schwab@suse.de>
Cc: Paul_Koning@Dell.com, gdb-patches@sourceware.org
Subject: Re: [PATCH] Python 3 support, part 2 (testsuite part)
Date: Sun, 13 Jan 2013 08:25:00 -0000	[thread overview]
Message-ID: <20130113082526.GP6143@adacore.com> (raw)
In-Reply-To: <mvmfw2sxtlu.fsf@hawking.suse.de>

[-- Attachment #1: Type: text/plain, Size: 504 bytes --]

> 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  <brobecker@adacore.com>

        * gdb.python/py-finish-breakpoint.exp: Add skip_python_tests
        check.  Move $gdb_py_is_py24 value check right after.

-- 
Joel

[-- Attachment #2: py-finish-breakpoint.diff --]
[-- Type: text/x-diff, Size: 2170 bytes --]

commit bb9a845e2b13f7b57012775fec078071537bad75
Author: Joel Brobecker <brobecker@adacore.com>
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  <brobecker@adacore.com>
+
+	* 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  <jan.kratochvil@redhat.com>
 
 	* 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
 
 

      reply	other threads:[~2013-01-13  8:25 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
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 [this message]

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=20130113082526.GP6143@adacore.com \
    --to=brobecker@adacore.com \
    --cc=Paul_Koning@Dell.com \
    --cc=gdb-patches@sourceware.org \
    --cc=schwab@suse.de \
    /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