This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Make tests more flexible
- From: Elena Zannoni <ezannoni at redhat dot com>
- To: Fernando Nasser <fnasser at redhat dot com>
- Cc: Elena Zannoni <ezannoni at redhat dot com>, gdb-patches at sources dot redhat dot com, carlton at math dot stanford dot edu
- Date: Thu, 16 Jan 2003 11:44:33 -0500
- Subject: Re: [PATCH] Make tests more flexible
- References: <15910.5244.45739.864752@localhost.redhat.com><3E26C44E.2050500@redhat.com>
Fernando Nasser writes:
> Yes, this is the right way of doing it.
>
> I missed it when reviewing the patch. I guess I just assumed that this section
> is more or less cut-and-paste from the other files.
Indeed, I did. But I picked the wrong file...
>
> Which brings up the question: where did you copy it from? I see a few other
Some of the below, now I don't remember.
> files with the
>
> set srcfile ${srcdir}/${subdir}/${testfile}.c
>
> line. They should be breaking runs with "different test tree configurations" as
> well.
>
Yeah, I noticed this last night. I don't know if these too create odd
results for David. I think David is configuring and building gdb in
the same tree. I am not sure that this is guaranteed to work,
testsuite-wise.
> display.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> long_long.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> mips_pro.exp:set srcfile ${srcdir}/$subdir/${testfile}.c
> overlays.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> relocate.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> setshow.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> step-line.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
> step-test.exp:set srcfile ${srcdir}/${subdir}/${testfile}.c
>
>
> Should we make the same change to those?
I am tempted to say yes, but first I would like to understand David's
problems a bit better.
Elena
>
> Regards,
> Fernando
>
>
> Elena Zannoni wrote:> David, try this, if it works for you I'll check it in as
> obvious.
> >
> > Elena
> >
> >
> > 2003-01-15 Elena Zannoni <ezannoni@redhat.com>
> >
> > * gdb.base/until.exp: Set variable 'srcfile' differently, to allow
> > for different test tree configurations.
> > Update some tescases accordingly.
> > * gdb.base/advance.exp: Ditto.
> >
> > Index: advance.exp
> > ===================================================================
> > RCS file: /cvs/uberbaum/gdb/testsuite/gdb.base/advance.exp,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 advance.exp
> > --- advance.exp 15 Jan 2003 14:25:11 -0000 1.1
> > +++ advance.exp 16 Jan 2003 02:02:23 -0000
> > @@ -24,11 +24,11 @@ if $tracelevel then {
> > }
> >
> > set testfile advance
> > -set srcfile ${srcdir}/${subdir}/${testfile}.c
> > +set srcfile ${testfile}.c
> > set binfile ${objdir}/${subdir}/${testfile}
> >
> > remote_exec build "rm -f ${binfile}"
> > -if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
> > +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
> > gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
> > }
> >
> >
> > Index: until.exp
> > ===================================================================
> > RCS file: /cvs/uberbaum/gdb/testsuite/gdb.base/until.exp,v
> > retrieving revision 1.1
> > diff -u -p -r1.1 until.exp
> > --- until.exp 15 Jan 2003 14:25:10 -0000 1.1
> > +++ until.exp 16 Jan 2003 02:04:54 -0000
> > @@ -24,11 +24,11 @@ if $tracelevel then {
> > }
> >
> > set testfile break
> > -set srcfile ${srcdir}/${subdir}/${testfile}.c
> > +set srcfile ${testfile}.c
> > set binfile ${objdir}/${subdir}/${testfile}
> >
> > remote_exec build "rm -f ${binfile}"
> > -if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
> > +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
> > gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
> > }
> >
> > @@ -63,7 +63,7 @@ delete_breakpoints
> > # frame.
> > #
> > gdb_test "until 99" \
> > - "factorial.*value=720.*at ${srcfile}:99.*return \\(value\\)." \
> > + "factorial.*value=720.*at.*${srcfile}:99.*return \\(value\\)." \
> > "until factorial, recursive function"
> >
> > # Run to a function called by main
> > @@ -76,6 +76,6 @@ delete_breakpoints
> > # stop at main, the caller, where we put the 'guard' breakpoint.
> > #
> > gdb_test "until marker3" \
> > - "$hex in main.*argc.*argv.*envp.*at ${srcfile}:82.*marker2 \\(43\\)." \
> > + "$hex in main.*argc.*argv.*envp.*at.*${srcfile}:82.*marker2 \\(43\\)." \
> > "until func, not called by current frame"
> >
>
>
>
> --
> Fernando Nasser
> Red Hat - Toronto E-Mail: fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9