public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PUSHED] gdb/testsuite: add missing skip_python_tests call in py-doc-reformat.exp
Date: Mon,  6 Jun 2022 12:40:55 +0100	[thread overview]
Message-ID: <20220606114055.52878-1-aburgess@redhat.com> (raw)
In-Reply-To: <5ad1534d98e1c6132722d663180a97ebcc2075df.camel@us.ibm.com>

Carl,

Thanks for bringing this to my attention.  Sorry for the slow reply,
I've been away for a couple of days.

The problem was that I had missed a call to skip_python_tests in the
new test script.  Recently, GDB was changed so that it will no longer
build against Python 2, this means on machines without Python 3 there
will be no Python support, the 'source' command used in the test will
then fail.

The correct fix is to check that GDB has Python support at the top of
the test script, which this commit does.

Thanks,
Andrew

---

In commit:

  commit 51e8dbe1fbe7d8955589703140ca5eba7b4f1bd7
  Date:   Mon May 16 19:26:54 2022 +0100

      gdb/python: improve formatting of help text for user defined commands

the test that was added (gdb.python/py-doc-reformat.exp) was missing a
call to skip_python_tests.  As a result, this test would fail for any
GDB built within Python support.

This commit adds a call to skip_python_tests.
---
 gdb/testsuite/gdb.python/py-doc-reformat.exp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdb/testsuite/gdb.python/py-doc-reformat.exp b/gdb/testsuite/gdb.python/py-doc-reformat.exp
index aae3939bd07..f0cfa278557 100644
--- a/gdb/testsuite/gdb.python/py-doc-reformat.exp
+++ b/gdb/testsuite/gdb.python/py-doc-reformat.exp
@@ -19,6 +19,10 @@
 
 load_lib gdb-python.exp
 
+# Check that Python is supported.
+clean_restart
+if { [skip_python_tests] } { continue }
+
 # A global counter used to number the tests.
 set idx 0
 
-- 
2.25.4


  reply	other threads:[~2022-06-06 11:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17 10:51 [PATCH 0/2] Improve help test for commands defined in Python Andrew Burgess
2022-05-17 10:51 ` [PATCH 1/2] gdb: use gdb::unique_xmalloc_ptr<char> for docs in cmdpy_init Andrew Burgess
2022-05-26 17:43   ` Tom Tromey
2022-05-28 10:10     ` Andrew Burgess
2022-05-17 10:51 ` [PATCH 2/2] gdb/python: improve formatting of help text for user defined commands Andrew Burgess
2022-05-17 12:19   ` Eli Zaretskii
2022-05-17 22:41   ` Lancelot SIX
2022-05-18 10:19   ` Andrew Burgess
2022-05-18 12:09     ` Eli Zaretskii
2022-05-26 17:46     ` Tom Tromey
2022-05-28 10:11       ` Andrew Burgess
2022-05-31 21:54         ` Carl Love
2022-05-31 23:10           ` Carl Love
2022-06-03 18:05             ` Carl Love
2022-06-06 11:40               ` Andrew Burgess [this message]
2022-06-07 16:08                 ` [PUSHED] gdb/testsuite: add missing skip_python_tests call in py-doc-reformat.exp Carl Love

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=20220606114055.52878-1-aburgess@redhat.com \
    --to=aburgess@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).