gdb/testsuite: rename .py.in files to .py
authorSimon Marchi <simon.marchi@polymtl.ca>
Mon, 17 May 2021 18:58:26 +0000 (14:58 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 17 May 2021 18:58:26 +0000 (14:58 -0400)
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

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-framefilter-gdb.py [new file with mode: 0644]
gdb/testsuite/gdb.python/py-framefilter-gdb.py.in [deleted file]
gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py [new file with mode: 0644]
gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in [deleted file]
gdb/testsuite/gdb.python/py-framefilter-invalidarg.exp
gdb/testsuite/gdb.python/py-framefilter.exp

index 69d00ff8cea692ce430347d0645f34856a8a1478..95f5536c64b79621c6569c67a1cbe8fb40eadecb 100644 (file)
@@ -1,3 +1,10 @@
+2021-05-17  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * 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.
+
 2021-05-17  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * gdb.python/py-framefilter-gdb.py.in: Re-format.
diff --git a/gdb/testsuite/gdb.python/py-framefilter-gdb.py b/gdb/testsuite/gdb.python/py-framefilter-gdb.py
new file mode 100644 (file)
index 0000000..d2205f4
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright (C) 2013-2021 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests Python-based
+# frame-filters.
+import gdb
+import itertools
+from gdb.FrameDecorator import FrameDecorator
+
+
+class FrameObjFile:
+    def __init__(self):
+        self.name = "Filter1"
+        self.priority = 1
+        self.enabled = False
+        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
+        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
+
+    def filter(self, frame_iter):
+        return frame_iter
+
+
+class FrameObjFile2:
+    def __init__(self):
+        self.name = "Filter2"
+        self.priority = 100
+        self.enabled = True
+        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
+        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
+
+    def filter(self, frame_iter):
+        return frame_iter
+
+
+FrameObjFile()
+FrameObjFile2()
diff --git a/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in b/gdb/testsuite/gdb.python/py-framefilter-gdb.py.in
deleted file mode 100644 (file)
index d2205f4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2013-2021 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This file is part of the GDB testsuite.  It tests Python-based
-# frame-filters.
-import gdb
-import itertools
-from gdb.FrameDecorator import FrameDecorator
-
-
-class FrameObjFile:
-    def __init__(self):
-        self.name = "Filter1"
-        self.priority = 1
-        self.enabled = False
-        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
-        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
-
-    def filter(self, frame_iter):
-        return frame_iter
-
-
-class FrameObjFile2:
-    def __init__(self):
-        self.name = "Filter2"
-        self.priority = 100
-        self.enabled = True
-        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
-        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
-
-    def filter(self, frame_iter):
-        return frame_iter
-
-
-FrameObjFile()
-FrameObjFile2()
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py b/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py
new file mode 100644 (file)
index 0000000..e27b898
--- /dev/null
@@ -0,0 +1,48 @@
+# Copyright (C) 2014-2021 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This file is part of the GDB testsuite.  It tests Python-based
+# frame-filters.
+import gdb
+import itertools
+from gdb.FrameDecorator import FrameDecorator
+
+
+class FrameObjFile:
+    def __init__(self):
+        self.name = "Filter1"
+        self.priority = 1
+        self.enabled = False
+        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
+        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
+
+    def filter(self, frame_iter):
+        return frame_iter
+
+
+class FrameObjFile2:
+    def __init__(self):
+        self.name = "Filter2"
+        self.priority = 100
+        self.enabled = True
+        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
+        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
+
+    def filter(self, frame_iter):
+        return frame_iter
+
+
+FrameObjFile()
+FrameObjFile2()
diff --git a/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in b/gdb/testsuite/gdb.python/py-framefilter-invalidarg-gdb.py.in
deleted file mode 100644 (file)
index e27b898..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright (C) 2014-2021 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This file is part of the GDB testsuite.  It tests Python-based
-# frame-filters.
-import gdb
-import itertools
-from gdb.FrameDecorator import FrameDecorator
-
-
-class FrameObjFile:
-    def __init__(self):
-        self.name = "Filter1"
-        self.priority = 1
-        self.enabled = False
-        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
-        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
-
-    def filter(self, frame_iter):
-        return frame_iter
-
-
-class FrameObjFile2:
-    def __init__(self):
-        self.name = "Filter2"
-        self.priority = 100
-        self.enabled = True
-        gdb.current_progspace().frame_filters["Progspace" + self.name] = self
-        gdb.current_objfile().frame_filters["ObjectFile" + self.name] = self
-
-    def filter(self, frame_iter):
-        return frame_iter
-
-
-FrameObjFile()
-FrameObjFile2()
index 86f3056bbd8d82fc303da917ab750cafea15d675..58b06d87e72d09f15af7b52833ae3635ba6ad96e 100644 (file)
@@ -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
index a9c6ca642bef058c71963bb9239ac2ab8892c5b1..7fbb4fcfec95c414bdcfd3983c32ee1e3f4cca02 100644 (file)
@@ -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
This page took 0.036964 seconds and 4 git commands to generate.