public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe
@ 2009-08-03  2:11 Thiago Jung Bauermann
  2009-08-03 17:53 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Jung Bauermann @ 2009-08-03  2:11 UTC (permalink / raw)
  To: archer

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

Hi,

The second patch is also very simple. The only difference is that I had
to change some .exp files to adjust the testfile variable:

# On branch python
# Your branch is ahead of 'archer/archer-tromey-python' by 1 commit.
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	renamed:    testsuite/gdb.python/python-cmd.exp -> testsuite/gdb.python/cmd.exp
#	renamed:    testsuite/gdb.python/python-frame.c -> testsuite/gdb.python/frame.c
#	renamed:    testsuite/gdb.python/python-frame.exp -> testsuite/gdb.python/frame.exp
#	renamed:    testsuite/gdb.python/python-function.exp -> testsuite/gdb.python/function.exp
#	renamed:    testsuite/gdb.python/python-inferior.c -> testsuite/gdb.python/inferior.c
#	renamed:    testsuite/gdb.python/python-inferior.exp -> testsuite/gdb.python/inferior.exp
#	renamed:    testsuite/gdb.python/python-infthread.c -> testsuite/gdb.python/infthread.c
#	renamed:    testsuite/gdb.python/python-infthread.exp -> testsuite/gdb.python/infthread.exp
#	renamed:    testsuite/gdb.python/python-mi.exp -> testsuite/gdb.python/mi.exp
#	renamed:    testsuite/gdb.python/python-prettyprint.c -> testsuite/gdb.python/prettyprint.c
#	renamed:    testsuite/gdb.python/python-prettyprint.exp -> testsuite/gdb.python/prettyprint.exp
#	renamed:    testsuite/gdb.python/python-prettyprint.py -> testsuite/gdb.python/prettyprint.py
#	renamed:    testsuite/gdb.python/python-template.cc -> testsuite/gdb.python/template.cc
#	renamed:    testsuite/gdb.python/python-template.exp -> testsuite/gdb.python/template.exp
#	renamed:    testsuite/gdb.python/python-value.c -> testsuite/gdb.python/value.c
#	renamed:    testsuite/gdb.python/python-value.exp -> testsuite/gdb.python/value.exp
#
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   testsuite/gdb.python/Makefile.in
#	modified:   testsuite/gdb.python/frame.exp
#	modified:   testsuite/gdb.python/inferior.exp
#	modified:   testsuite/gdb.python/infthread.exp
#	modified:   testsuite/gdb.python/mi.exp
#	modified:   testsuite/gdb.python/prettyprint.exp
#	modified:   testsuite/gdb.python/template.exp
#	modified:   testsuite/gdb.python/value.exp
#

Again, I won't post the renaming part of the patch here, just the part
which changes the contents of the files.

Ok for the branch and then for upstream? With this patch series,
all 327 tests in gdb.python continue to pass.

It's getting late here, so I'll write the changelog part of this patch tomorrow, sorry.
-- 
[]'s
Thiago Jung Bauermann

[-- Attachment #2: python-rename-testsuite.diff --]
[-- Type: text/x-patch, Size: 3921 bytes --]

diff --git a/gdb/testsuite/gdb.python/Makefile.in b/gdb/testsuite/gdb.python/Makefile.in
index c49f713..655e604 100644
--- a/gdb/testsuite/gdb.python/Makefile.in
+++ b/gdb/testsuite/gdb.python/Makefile.in
@@ -1,7 +1,7 @@
 VPATH = @srcdir@
 srcdir = @srcdir@
 
-EXECUTABLES = python-value python-prettyprint python-template
+EXECUTABLES = value prettyprint template
 
 all info install-info dvi install uninstall installcheck check:
 	@echo "Nothing to be done for $@..."
diff --git a/gdb/testsuite/gdb.python/frame.exp b/gdb/testsuite/gdb.python/frame.exp
index 82ae814..13af0ba 100644
--- a/gdb/testsuite/gdb.python/frame.exp
+++ b/gdb/testsuite/gdb.python/frame.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-frame"
+set testfile "frame"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python/inferior.exp b/gdb/testsuite/gdb.python/inferior.exp
index ea413c6..435f215 100644
--- a/gdb/testsuite/gdb.python/inferior.exp
+++ b/gdb/testsuite/gdb.python/inferior.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-inferior"
+set testfile "inferior"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python/infthread.exp b/gdb/testsuite/gdb.python/infthread.exp
index d444554..82a1f0a 100644
--- a/gdb/testsuite/gdb.python/infthread.exp
+++ b/gdb/testsuite/gdb.python/infthread.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-infthread"
+set testfile "infthread"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python/mi.exp b/gdb/testsuite/gdb.python/mi.exp
index e7bfe54..ee000f1 100644
--- a/gdb/testsuite/gdb.python/mi.exp
+++ b/gdb/testsuite/gdb.python/mi.exp
@@ -24,7 +24,7 @@ if [mi_gdb_start] {
     continue
 }
 
-set testfile "python-prettyprint"
+set testfile "prettyprint"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
diff --git a/gdb/testsuite/gdb.python/prettyprint.exp b/gdb/testsuite/gdb.python/prettyprint.exp
index b2dc85d..2134ab9 100644
--- a/gdb/testsuite/gdb.python/prettyprint.exp
+++ b/gdb/testsuite/gdb.python/prettyprint.exp
@@ -20,7 +20,7 @@ if $tracelevel then {
     strace $tracelevel
 }
 
-set testfile "python-prettyprint"
+set testfile "prettyprint"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
diff --git a/gdb/testsuite/gdb.python/template.exp b/gdb/testsuite/gdb.python/template.exp
index b80f56e..2d76371 100644
--- a/gdb/testsuite/gdb.python/template.exp
+++ b/gdb/testsuite/gdb.python/template.exp
@@ -31,7 +31,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-template"
+set testfile "template"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
diff --git a/gdb/testsuite/gdb.python/value.exp b/gdb/testsuite/gdb.python/value.exp
index ccf438f..a4f58af 100644
--- a/gdb/testsuite/gdb.python/value.exp
+++ b/gdb/testsuite/gdb.python/value.exp
@@ -220,7 +220,7 @@ proc test_value_in_inferior {} {
 
 # A few objfile tests.
 proc test_objfiles {} {
-    gdb_test "python\nok=False\nfor file in gdb.objfiles():\n  if 'python-value' in file.filename:\n    ok=True\nprint ok\nend" "True"
+    gdb_test "python\nok=False\nfor file in gdb.objfiles():\n  if 'value' in file.filename:\n    ok=True\nprint ok\nend" "True"
 
     gdb_test "python print gdb.objfiles()\[0\].pretty_printers" "\\\[\\\]"
 
@@ -275,7 +275,7 @@ if ![python_supported] then {
   return -1
 }
 
-set testfile "python-value"
+set testfile "value"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 

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

* Re: [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe
  2009-08-03  2:11 [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe Thiago Jung Bauermann
@ 2009-08-03 17:53 ` Tom Tromey
  2009-08-04 20:58   ` Thiago Jung Bauermann
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2009-08-03 17:53 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: archer

>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@gmail.com> writes:

Thiago> #	renamed:    testsuite/gdb.python/python-mi.exp -> testsuite/gdb.python/mi.exp

It is actually useful to have all .exp files have a globally unique
name.  That way you can run just a single file by passing its basename
to runtest.

I didn't check to see if any of these basenames clash -- but they seem a
bit generic.

So, how about py-mi.exp?

Otherwise it is all fine by me.

Tom

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

* Re: [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe
  2009-08-03 17:53 ` Tom Tromey
@ 2009-08-04 20:58   ` Thiago Jung Bauermann
  2009-08-12 22:16     ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Thiago Jung Bauermann @ 2009-08-04 20:58 UTC (permalink / raw)
  To: Tom Tromey; +Cc: archer

Em Segunda-feira 03 Agosto 2009 14:52:57 Tom Tromey escreveu:
> >>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@gmail.com>
> >>>>> writes:
>
> Thiago> #	renamed:    testsuite/gdb.python/python-mi.exp ->
> testsuite/gdb.python/mi.exp
>
> It is actually useful to have all .exp files have a globally unique
> name.  That way you can run just a single file by passing its basename
> to runtest.
>
> I didn't check to see if any of these basenames clash -- but they seem a
> bit generic.
>
> So, how about py-mi.exp?

I forgot to mention that before I submitted the patch, I verified that

% make check RUNTESTFLAGS=gdb.python/foo.exp

works as expected, even if there's a foo.exp somewhere else (i.e., that other 
foo.exp will not be run). Do you still prefer unique basenames?

> Otherwise it is all fine by me.

I'll hold on this patch while I see what should be done regarding the 
gdb/python/*.[ch] files. I'm not liking fnchange.lst much, will have to raise 
this topic upstream...
-- 
[]'s
Thiago Jung Bauermann

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

* Re: [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe
  2009-08-04 20:58   ` Thiago Jung Bauermann
@ 2009-08-12 22:16     ` Tom Tromey
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2009-08-12 22:16 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: archer

>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@gmail.com> writes:

Thiago> I forgot to mention that before I submitted the patch, I verified that
Thiago> % make check RUNTESTFLAGS=gdb.python/foo.exp
Thiago> works as expected, even if there's a foo.exp somewhere else
Thiago> (i.e., that other foo.exp will not be run). Do you still prefer
Thiago> unique basenames?

Oops, I forgot to answer.
This is sufficient for me, I don't require unique basenames.
Thanks.

Tom

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

end of thread, other threads:[~2009-08-12 22:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-03  2:11 [2/2][RFA][7.0] Rename Python testcase files to be 8.3 safe Thiago Jung Bauermann
2009-08-03 17:53 ` Tom Tromey
2009-08-04 20:58   ` Thiago Jung Bauermann
2009-08-12 22:16     ` Tom Tromey

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