Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: PATCH: clean up test suite debug format xfail stuff
Date: Tue, 02 Oct 2001 12:44:00 -0000	[thread overview]
Message-ID: <20011002194555.2F4485E9D8@zwingli.cygnus.com> (raw)

(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;


             reply	other threads:[~2001-10-02 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 12:44 Jim Blandy [this message]
2001-10-02 13:31 ` Michael Snyder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011002194555.2F4485E9D8@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox