Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* PATCH: clean up test suite debug format xfail stuff
@ 2001-10-02 12:44 Jim Blandy
  2001-10-02 13:31 ` Michael Snyder
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Blandy @ 2001-10-02 12:44 UTC (permalink / raw)
  To: gdb-patches

(What a fine noun clause that is!)

I've committed this change.

2001-10-02  Jim Blandy  <jimb@redhat.com>

	* lib/gdb.exp (test_xfail_format): Simplify.

	* lib/gdb.exp (setup_xfail_format): Don't forget to put a `$' in
	front of the variable name `format'.  Simplify `if'.

Index: gdb/testsuite/lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.13
diff -c -r1.13 gdb.exp
*** gdb/testsuite/lib/gdb.exp	2001/09/27 21:35:55	1.13
--- gdb/testsuite/lib/gdb.exp	2001/10/02 19:32:01
***************
*** 1417,1442 ****
      }
  }
  
  # Like setup_xfail, but takes the name of a debug format (DWARF 1,
  # COFF, stabs, etc).  If that format matches the format that the
  # current test was compiled with, then the next test is expected to
  # fail for any target.  Returns 1 if the next test or set of tests is
  # expected to fail, 0 otherwise (or if it is unknown).  Must have
  # previously called get_debug_format.
- 
- proc test_debug_format { format } {
-     global debug_format
- 
-     if [string match $debug_format $format] then {
- 	return 1;
-     }
-     return 0
- }
- 
  proc setup_xfail_format { format } {
!     set ret [test_debug_format format];
  
!     if [expr $ret != 0] then {
  	setup_xfail "*-*-*"
      }
      return $ret;
--- 1417,1444 ----
      }
  }
  
+ # Return true if FORMAT matches the debug format the current test was
+ # compiled with.  FORMAT is a shell-style globbing pattern; it can use
+ # `*', `[...]', and so on.
+ #
+ # This function depends on variables set by `get_debug_format', above.
+ 
+ proc test_debug_format {format} {
+     global debug_format
+ 
+     return [expr [string match $format $debug_format] != 0]
+ }
+ 
  # Like setup_xfail, but takes the name of a debug format (DWARF 1,
  # COFF, stabs, etc).  If that format matches the format that the
  # current test was compiled with, then the next test is expected to
  # fail for any target.  Returns 1 if the next test or set of tests is
  # expected to fail, 0 otherwise (or if it is unknown).  Must have
  # previously called get_debug_format.
  proc setup_xfail_format { format } {
!     set ret [test_debug_format $format];
  
!     if {$ret} then {
  	setup_xfail "*-*-*"
      }
      return $ret;


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

* Re: PATCH: clean up test suite debug format xfail stuff
  2001-10-02 12:44 PATCH: clean up test suite debug format xfail stuff Jim Blandy
@ 2001-10-02 13:31 ` Michael Snyder
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Snyder @ 2001-10-02 13:31 UTC (permalink / raw)
  To: Jim Blandy; +Cc: gdb-patches

Jim Blandy wrote:
> 
> (What a fine noun clause that is!)
> 
> I've committed this change.
> 
> 2001-10-02  Jim Blandy  <jimb@redhat.com>
> 
>         * lib/gdb.exp (test_xfail_format): Simplify.
> 
>         * lib/gdb.exp (setup_xfail_format): Don't forget to put a `$' in
>         front of the variable name `format'.  Simplify `if'.

Thanks, Jim

> 
> Index: gdb/testsuite/lib/gdb.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
> retrieving revision 1.13
> diff -c -r1.13 gdb.exp
> *** gdb/testsuite/lib/gdb.exp   2001/09/27 21:35:55     1.13
> --- gdb/testsuite/lib/gdb.exp   2001/10/02 19:32:01
> ***************
> *** 1417,1442 ****
>       }
>   }
> 
>   # Like setup_xfail, but takes the name of a debug format (DWARF 1,
>   # COFF, stabs, etc).  If that format matches the format that the
>   # current test was compiled with, then the next test is expected to
>   # fail for any target.  Returns 1 if the next test or set of tests is
>   # expected to fail, 0 otherwise (or if it is unknown).  Must have
>   # previously called get_debug_format.
> -
> - proc test_debug_format { format } {
> -     global debug_format
> -
> -     if [string match $debug_format $format] then {
> -       return 1;
> -     }
> -     return 0
> - }
> -
>   proc setup_xfail_format { format } {
> !     set ret [test_debug_format format];
> 
> !     if [expr $ret != 0] then {
>         setup_xfail "*-*-*"
>       }
>       return $ret;
> --- 1417,1444 ----
>       }
>   }
> 
> + # Return true if FORMAT matches the debug format the current test was
> + # compiled with.  FORMAT is a shell-style globbing pattern; it can use
> + # `*', `[...]', and so on.
> + #
> + # This function depends on variables set by `get_debug_format', above.
> +
> + proc test_debug_format {format} {
> +     global debug_format
> +
> +     return [expr [string match $format $debug_format] != 0]
> + }
> +
>   # Like setup_xfail, but takes the name of a debug format (DWARF 1,
>   # COFF, stabs, etc).  If that format matches the format that the
>   # current test was compiled with, then the next test is expected to
>   # fail for any target.  Returns 1 if the next test or set of tests is
>   # expected to fail, 0 otherwise (or if it is unknown).  Must have
>   # previously called get_debug_format.
>   proc setup_xfail_format { format } {
> !     set ret [test_debug_format $format];
> 
> !     if {$ret} then {
>         setup_xfail "*-*-*"
>       }
>       return $ret;


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

end of thread, other threads:[~2001-10-02 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-02 12:44 PATCH: clean up test suite debug format xfail stuff Jim Blandy
2001-10-02 13:31 ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox