This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

dejagnu patch


This is a patch submission for:
     dejagnu/runtest.exp
     dejagnu/lib/framework.exp
     dejagnu/lib/target.exp

This backs out the env changes to runtest.exp and target.exp, and
extends setup_xfail proc in framework.exp to allow alphanumeric 'PRMS'
ID strings.

- Jimmy Guo, guo@cup.hp.com

Index: dejagnu/runtest.exp
/opt/gnu/bin/diff -c -N -L dejagnu/runtest.exp dejagnu/runtest.exp@@/GDB_1999_07_19 dejagnu/runtest.exp
*** dejagnu/runtest.exp
--- dejagnu/runtest.exp	Fri Jun 25 16:34:58 1999
***************
*** 1594,1617 ****
  # "{ name var1=value1 ... }" where `name' is a generic name for the pass and
  # currently has no other meaning.
  
-     global env
- 
      if { [info exists MULTIPASS] } {
  	set multipass $MULTIPASS
-     } elseif {[info exists env(MULTIPASS)]} {
- 	set multipass $env(MULTIPASS)
      }
      if { $multipass == "" } {
  	set multipass { "" }
      }
  
! # If PASS is specified, either as a TCL variable or in environment, we
! # want to run only the tests specified. Its value should be a number
! # or a list of numbers that specify the passes that we want to run.
      if [info exists PASS] {
  	set pass $PASS
-     } elseif [info exists env(PASS)] {
- 	set pass $env(PASS)
      } else {
  	set pass ""
      }
--- 1594,1611 ----
  # "{ name var1=value1 ... }" where `name' is a generic name for the pass and
  # currently has no other meaning.
  
      if { [info exists MULTIPASS] } {
  	set multipass $MULTIPASS
      }
      if { $multipass == "" } {
  	set multipass { "" }
      }
  
! # If PASS is specified, we want to run only the tests specified.
! # Its value should be a number or a list of numbers that specify the
! # passes that we want to run.
      if [info exists PASS] {
  	set pass $PASS
      } else {
  	set pass ""
      }
Index: dejagnu/lib/target.exp
/opt/gnu/bin/diff -c -N -L dejagnu/lib/target.exp dejagnu/lib/target.exp@@/GDB_1999_07_19 dejagnu/lib/target.exp
*** dejagnu/lib/target.exp
--- dejagnu/lib/target.exp	Fri Jun 25 16:35:18 1999
***************
*** 142,204 ****
      if [ishost "alpha*-*-*"] {
          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text
      }
      if [ishost "hppa*-*-hpux*"] {
!        # Ignore the compiler's warnings about PA incompatibility.
!        regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
   
!        regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
! 
!        # And the linker's +vcompatwarnings verbage.
!        regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
  
!        # Ignore these warnings, which the HP aCC compiler seems to
!        # generate on HP-UX 10.30 and 11.0.  (Something is probably
!        # wrong with some system headers, but still...)
!        #
!        # This particular warning always is given with a line of warning
!        # text, followed by a source line, followed by a line with "^^^"
!        # underlining an offending symbol name.  Here we slurp up the
!        # warning text and the next two lines, assuming that they are
!        # the source line and underline chars.
!        #
!        regsub -all "Warning .*The linkage directive is ignored for an object or function declared static..\[^\n\]*.\[^\n\]*." $text "" text
   
!        # Ignore these warnings, which I often see from the ANSI C
!        # compiler installed on HP-UX 11.0 machines.  (Something is
!        # probably wrong with an installation, or perhaps NLS isn't
!        # quite healthy yet on 11.0.  In either case, it's easier to
!        # "fix" this nit here, than it is to track down & fix the
!        # root cause.)
!        #
!        # This particular warning always is given with a line of warning
!        # text, followed by line that says "Using internal messages".
!        #
!        regsub -all "Warning: Unable to open pxdb message catalog.*" $text "" text
!        regsub -all ".* Using internal messages.*" $text "" text
   
!        # Another form of the "unable to find message catalog" warning.
!        #
!        regsub -all "cpp: warning .*Possibly incorrect message catalog." $text "" text
   
!        # Another odd warning on 11.0.
!        #
!        regsub -all "aCC .assigner.: Warning .*Could not find library for -l.*" $text "" text
   
!        # Oh heck, just keep adding 'em here...
!        #
!        regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!       # Remove the lines that are output by the HP F77 compiler to
!       # indicate the functions that are being compiled.
!       upvar compiler_type compiler_type
!       if { [info exists compiler_type] && $compiler_type == "f77" } {
! 	  regsub -all "\[ \ta-zA-Z_0-9\./\]*:\[\r\n\]+" $text "" text
!       }
  
!       # Ignore the warnings about unknown options
!       regsub -all ".*warning \[0-9\]+: Unknown option.*ignored.*" $text "" text
! 
!       }
  
      # Ignore these.
      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
--- 142,204 ----
      if [ishost "alpha*-*-*"] {
          regsub -all "(^|\n)(/usr/(ucb|bin)/ld.*without exceptions was\[^\n\]+\n?)" $text "\\1" text
      }
+ 
      if [ishost "hppa*-*-hpux*"] {
!         # Ignore the compiler's warnings about PA incompatibility.
!         regsub -all "(^|\n)\[^\n\]*PA 2.0 object file \[^\n\]* was detected. The linked output may not run on a PA 1.x system." $text "" text 
   
!         # And the linker's +vcompatwarnings verbage.
!         regsub -all "(^|\n)\[^\n\]*Linker features were used that may not be supported\[^\n\]*.\[^\n\]*." $text "" text
  
!         # Ignore these warnings, which the HP aCC compiler seems to
!         # generate on HP-UX 10.30 and 11.0.  (Something is probably
!         # wrong with some system headers, but still...)
!         #
!         # This particular warning always is given with a line of warning
!         # text, followed by a source line, followed by a line with "^^^"
!         # underlining an offending symbol name.  Here we slurp up the
!         # warning text and the next two lines, assuming that they are
!         # the source line and underline chars.
!         #
!         regsub -all "Warning .*The linkage directive is ignored for an object or function declared static..\[^\n\]*.\[^\n\]*." $text "" text
   
!         # Ignore these warnings, which I often see from the ANSI C
!         # compiler installed on HP-UX 11.0 machines.  (Something is
!         # probably wrong with an installation, or perhaps NLS isn't
!         # quite healthy yet on 11.0.  In either case, it's easier to
!         # "fix" this nit here, than it is to track down & fix the
!         # root cause.)
!         #
!         # This particular warning always is given with a line of warning
!         # text, followed by line that says "Using internal messages".
!         #
!         regsub -all "Warning: Unable to open pxdb message catalog.*" $text "" text
!         regsub -all ".* Using internal messages.*" $text "" text
   
!         # Another form of the "unable to find message catalog" warning.
!         #
!         regsub -all "cpp: warning .*Possibly incorrect message catalog." $text "" text
   
!         # Another odd warning on 11.0.
!         #
!         regsub -all "aCC .assigner.: Warning .*Could not find library for -l.*" $text "" text
   
!         # Oh heck, just keep adding 'em here...
!         #
!         regsub -all "aCC .assigner.: Warning .*Could not satisfy instantiation request for \[^\n\]* contained in\[^\n\]*\n\t/lib/pa20_64/lib\[a-zA-Z0-9\]*.sl" $text "" text
         
!         # Remove the lines that are output by the HP F77 / F90 compiler to
!         # indicate the functions that are being compiled.
!         upvar compiler_type compiler_type
!         if { [info exists compiler_type]
! 	    &&
! 	    ($compiler_type == "f77") } {
! 	    regsub -all "\[ \ta-zA-Z_0-9\./\-\]*(:|)\[\r\n\]+.*" $text "" text
!         }
  
!         # Ignore the warnings about unknown options
!         regsub -all ".*warning \[0-9\]+: Unknown option.*ignored.*" $text "" text
!     }
  
      # Ignore these.
      regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
***************
*** 283,289 ****
  proc default_target_compile {source destfile type options} {
      global target_triplet
      global tool_root_dir
-     global env
      global CFLAGS_FOR_TARGET
      global compiler_flags
  
--- 283,288 ----
***************
*** 300,310 ****
  
      if [info exists CFLAGS_FOR_TARGET] {
  	append add_flags " $CFLAGS_FOR_TARGET"
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(CFLAGS_FOR_TARGET)] {
- #	append add_flags " $env(CFLAGS_FOR_TARGET)"
      }
  
      if [info exists target_info(host,name)] {
--- 299,304 ----
***************
*** 393,440 ****
      global CC_FOR_TARGET
      global CXX_FOR_TARGET
      global F77_FOR_TARGET
!     
      if [info exists CC_FOR_TARGET] {
  	if { $compiler == "" } {
  	    set compiler $CC_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(CC_FOR_TARGET)] {
- #	if { $compiler == "" } {
- #	    set compiler $env(CC_FOR_TARGET)
- #	}
-     } elseif { [info exists env(CC_FOR_TARGET)] && $env(CC_FOR_TARGET) != "" } {
- 	if { $compiler == "" } {
- 	    set compiler $env(CC_FOR_TARGET)
- 	}
      }
  
      if [info exists CXX_FOR_TARGET] {
  	if { $compiler_type == "c++" } {
  	    set compiler $CXX_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(CXX_FOR_TARGET)] {
- #	if { $compiler_type == "c++" } {
- #	    set compiler $env(CXX_FOR_TARGET)
- #	}
      }
  
      if [info exists F77_FOR_TARGET] {
  	if { $compiler_type == "f77" } {
  	    set compiler $F77_FOR_TARGET
  	}
- # When started from a mid-level directory (eg gdb)
- # the Makefile may export a *_FOR_TARGET that isn't
- # applicable.
- #    } elseif [info exists env(F77_FOR_TARGET)] {
- #	if { $compiler_type == "f77" } {
- #	    set compiler $env(F77_FOR_TARGET)
- #	}
      }
  
      if { $compiler == "" } {
--- 387,409 ----
      global CC_FOR_TARGET
      global CXX_FOR_TARGET
      global F77_FOR_TARGET
! 
      if [info exists CC_FOR_TARGET] {
  	if { $compiler == "" } {
  	    set compiler $CC_FOR_TARGET
  	}
      }
  
      if [info exists CXX_FOR_TARGET] {
  	if { $compiler_type == "c++" } {
  	    set compiler $CXX_FOR_TARGET
  	}
      }
  
      if [info exists F77_FOR_TARGET] {
  	if { $compiler_type == "f77" } {
  	    set compiler $F77_FOR_TARGET
  	}
      }
  
      if { $compiler == "" } {
***************
*** 642,655 ****
  }
  
  proc default_target_assemble { source destfile flags } {
!     global env
!     global AS_FOR_TARGET;
!     global ASFLAGS_FOR_TARGET;
  
      if [info exists AS_FOR_TARGET] {
  	set AS "$AS_FOR_TARGET";
-     } elseif [info exists env(AS_FOR_TARGET)] {
- 	set AS $env(AS_FOR_TARGET)
      } else {
  	if ![board_info target exists assembler] {
  	    set AS [find_gas];
--- 611,621 ----
  }
  
  proc default_target_assemble { source destfile flags } {
!     global AS_FOR_TARGET
!     global ASFLAGS_FOR_TARGET
  
      if [info exists AS_FOR_TARGET] {
  	set AS "$AS_FOR_TARGET";
      } else {
  	if ![board_info target exists assembler] {
  	    set AS [find_gas];
***************
*** 660,670 ****
  
      if [info exists ASFLAGS_FOR_TARGET] {
  	append flags " $ASFLAGS_FOR_TARGET";
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(ASFLAGS_FOR_TARGET)] {
- #	append flags " $env(ASFLAGS_FOR_TARGET)"
      }
  
      if [is_remote host] {
--- 626,631 ----
***************
*** 698,711 ****
  }
  
  proc default_link { board objects destfile flags } {
!     global env
!     global LD_FOR_TARGET;
!     global LDFLAGS_FOR_TARGET;
  
      if [info exists LD_FOR_TARGET] {
  	set LD "$LD_FOR_TARGET";
-     } elseif [info exists env(LD_FOR_TARGET)] {
- 	set LD $env(LD_FOR_TARGET)
      } else {
  	if ![board_info target exists linker] {
  	    set LD [find_ld];
--- 659,669 ----
  }
  
  proc default_link { board objects destfile flags } {
!     global LD_FOR_TARGET
!     global LDFLAGS_FOR_TARGET
  
      if [info exists LD_FOR_TARGET] {
  	set LD "$LD_FOR_TARGET";
      } else {
  	if ![board_info target exists linker] {
  	    set LD [find_ld];
***************
*** 716,726 ****
  
      if [info exists LDFLAGS_FOR_TARGET] {
  	append flags " $LDFLAGS_FOR_TARGET";
- # The top level Makefile sets (and exports) a *FLAGS_FOR_TARGET
- # that may not be applicable to testsuite runs.  This conflict
- # needs to be resolved.
- #    } elseif [info exists env(LDFLAGS_FOR_TARGET)] {
- #	append flags " $env(LDFLAGS_FOR_TARGET)"
      }
  
      if [board_info $board exists ldflags] {
--- 674,679 ----
Index: dejagnu/lib/framework.exp
/opt/gnu/bin/diff -c -N -L dejagnu/lib/framework.exp dejagnu/lib/framework.exp@@/GDB_1999_07_19 dejagnu/lib/framework.exp
*** dejagnu/lib/framework.exp
--- dejagnu/lib/framework.exp	Fri Jul 16 13:30:44 1999
***************
*** 417,424 ****
  # Setup a flag to control whether a failure is expected or not
  #
  # Multiple target triplet patterns can be specified for targets
! # for which the test fails.  A decimal number can be specified,
! # which is the PRMS number.
  #
  proc setup_xfail { args } {
      global xfail_flag
--- 417,424 ----
  # Setup a flag to control whether a failure is expected or not
  #
  # Multiple target triplet patterns can be specified for targets
! # for which the test fails.  A bug report ID can be specified,
! # which is a string without '-'.
  #
  proc setup_xfail { args } {
      global xfail_flag
***************
*** 428,435 ****
      set argc [ llength $args ]
      for { set i 0 } { $i < $argc } { incr i } {
  	set sub_arg [ lindex $args $i ]
! 	# is a prms number. we assume this is a number with no characters
! 	if [regexp "^\[0-9\]+$" $sub_arg] { 
  	    set xfail_prms $sub_arg
  	    continue
  	}
--- 428,435 ----
      set argc [ llength $args ]
      for { set i 0 } { $i < $argc } { incr i } {
  	set sub_arg [ lindex $args $i ]
! 	# is a prms number. we assume this is a string with no '-' characters
! 	if [regexp "^\[^\-\]+$" $sub_arg] { 
  	    set xfail_prms $sub_arg
  	    continue
  	}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]