public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite: rename .py.in files to .py
@ 2021-05-17 18:40 Simon Marchi
  2021-05-17 18:52 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2021-05-17 18:40 UTC (permalink / raw)
  To: gdb-patches

I noticed these files because they weren't considered by black for
reformatting, prior to adding pyproject.toml, because their extension is
not .py.  I don't think they specifically need to be named .py.in, so I
suggest renaming them to .py.  This will make it nicer to edit them, as
editors will recognize them more easily as Python files.

Perhaps this was needed before, when the testsuite didn't always put
output files in the output directory.  Then, a different name for the
source and destination file might have been desirable to avoid
overwriting a file with itself (perhaps that wasn't well handled).  But
in any case, it doesn't see to cause any problem now.

gdb/testsuite/ChangeLog:

	* gdb.python/py-framefilter-gdb.py.in: Rename to:
	* gdb.python/py-framefilter-gdb.py: ... this.
	* gdb.python/py-framefilter-invalidarg-gdb.py.in: Rename to:
	* gdb.python/py-framefilter-invalidarg-gdb.py: ... this.

Change-Id: I63bb94010bbbc33434ee1c91a386c91fc1ff80bc
---
 .../{py-framefilter-gdb.py.in => py-framefilter-gdb.py}       | 0
 ...-invalidarg-gdb.py.in => py-framefilter-invalidarg-gdb.py} | 0
 gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp        | 2 +-
 gdb/testsuite/gdb.python/py-framefilter.exp                   | 4 ++--
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename gdb/testsuite/gdb.python/{py-framefilter-gdb.py.in => py-framefilter-gdb.py} (100%)
 rename gdb/testsuite/gdb.python/{py-framefilter-invalidarg-gdb.py.in => py-framefilter-invalidarg-gdb.py} (100%)

diff --git a/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in b/gdb/testsuite/gdb.python/py-framefilter-gdb.py
similarity index 100%
rename from gdb/testsuite/gdb.python/py-framefilter-gdb.py.in
rename to gdb/testsuite/gdb.python/py-framefilter-gdb.py
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in b/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py
similarity index 100%
rename from gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in
rename to gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
index 86f3056bbd8d..58b06d87e72d 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
@@ -40,7 +40,7 @@ if { [skip_python_tests] } { continue }
 # gdb will find it.
 set remote_obj_python_file \
     [remote_download \
-	 host ${srcdir}/${subdir}/${testfile}-gdb.py.in \
+	 host ${srcdir}/${subdir}/${testfile}-gdb.py \
 	 [standard_output_file ${testfile}-gdb.py]]
 
 gdb_reinitialize_dir $srcdir/$subdir
diff --git a/gdb/testsuite/gdb.python/py-framefilter.exp b/gdb/testsuite/gdb.python/py-framefilter.exp
index a9c6ca642bef..7fbb4fcfec95 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.exp
+++ b/gdb/testsuite/gdb.python/py-framefilter.exp
@@ -41,7 +41,7 @@ gdb_test "info frame-filter" \
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
 set remote_obj_python_file \
-    [gdb_remote_download host ${srcdir}/${subdir}/${testfile}-gdb.py.in \
+    [gdb_remote_download host ${srcdir}/${subdir}/${testfile}-gdb.py \
 	 ${testfile}-gdb.py]
 
 gdb_reinitialize_dir $srcdir/$subdir
@@ -299,7 +299,7 @@ if { [skip_python_tests] } { continue }
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
 set remote_obj_python_file \
-    [gdb_remote_download host ${srcdir}/${subdir}/${testfile}-gdb.py.in \
+    [gdb_remote_download host ${srcdir}/${subdir}/${testfile}-gdb.py \
 	 ${testfile}-gdb.py]
 
 gdb_reinitialize_dir $srcdir/$subdir
-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: rename .py.in files to .py
  2021-05-17 18:40 [PATCH] gdb/testsuite: rename .py.in files to .py Simon Marchi
@ 2021-05-17 18:52 ` Tom Tromey
  2021-05-17 18:58   ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2021-05-17 18:52 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> I noticed these files because they weren't considered by black for
Simon> reformatting, prior to adding pyproject.toml, because their extension is
Simon> not .py.  I don't think they specifically need to be named .py.in, so I
Simon> suggest renaming them to .py.  This will make it nicer to edit them, as
Simon> editors will recognize them more easily as Python files.

Looks good.  Thank you.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gdb/testsuite: rename .py.in files to .py
  2021-05-17 18:52 ` Tom Tromey
@ 2021-05-17 18:58   ` Simon Marchi
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2021-05-17 18:58 UTC (permalink / raw)
  To: Tom Tromey, Simon Marchi via Gdb-patches



On 2021-05-17 2:52 p.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Simon> I noticed these files because they weren't considered by black for
> Simon> reformatting, prior to adding pyproject.toml, because their extension is
> Simon> not .py.  I don't think they specifically need to be named .py.in, so I
> Simon> suggest renaming them to .py.  This will make it nicer to edit them, as
> Simon> editors will recognize them more easily as Python files.
> 
> Looks good.  Thank you.
> 
> Tom
> 

Thanks, pushed.

Simon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-17 18:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17 18:40 [PATCH] gdb/testsuite: rename .py.in files to .py Simon Marchi
2021-05-17 18:52 ` Tom Tromey
2021-05-17 18:58   ` Simon Marchi

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).