This is the mail archive of the gdb-patches@sources.redhat.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]

[PATCH] dejagnu runtest.exp


Since DejaGNU has this notion of error / warnning counter and their
thresholds to control when to classify a test point as UNRESOLVED, force
reset of these counters after each test file to make sure the next test
file does not start with UNRESOLVED.

- Jimmy

Fri Jul 28 17:59:17	Jimmy Guo	<guo@cup.hp.com>

	* runtest.exp (runtest): always reset errcnt and warncnt
	after each test file.

Index: runtest.exp
/usr/local/bin/diff -c -L runtest.exp runtest.exp@@/GDB_2000_07_24 runtest.exp
*** runtest.exp
--- runtest.exp	Fri Jul 28 17:57:35 2000
***************
*** 1405,1411 ****
      global prms_id
      global bug_id
      global test_result
!     global errcnt
      global errorInfo
      global tool
  
--- 1405,1411 ----
      global prms_id
      global bug_id
      global test_result
!     global errcnt warncnt
      global errorInfo
      global tool
  
***************
*** 1447,1459 ****
  	# This should never happen, but maybe if the file got removed
  	# between the `find' above and here.
  	perror "$test_file_name does not exist."
- 	# ??? This is a hack.  We want to send a message to stderr and
- 	# to the summary file (just like perror does), but we don't
- 	# want the next testcase to get a spurious "unresolved" because
- 	# errcnt != 0.  Calling `clone_output' is also supposed to be a
- 	# no-no (see the comments for clone_output).
- 	set errcnt 0
      }
  }
  
  #
--- 1447,1459 ----
  	# This should never happen, but maybe if the file got removed
  	# between the `find' above and here.
  	perror "$test_file_name does not exist."
      }
+ 
+     # JYG: errcnt / warncnt are supposed to be per test point.
+     # once we leave the current test file, they must be reset
+     # to prevent the bogus unresolved message in the next test.
+     set errcnt 0
+     set warncnt 0
  }
  
  #


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