This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: run tests on installed compiler


Benjamin Kosnik wrote:
I would prefer that testsuite_file not be used, but I will defer to your instructions. Right now, I'm interpreting what you've said as an opinion, not a firm direction to change the way it works. If you want me to change it, please tell me do that explicitly.


Please change it.

Here is a patch to restore the previous behavior. Tested on x86_64-unknown-linux-gnu by running with a testsuite_files containing only a few files, and by running without testsuite_files and observing that the whole testsuite ran. OK to apply? If so, I think I am (perhaps temporarily) off the hook for updating the docs, as the old instructions re. testsuite_files still work.


As a compromise, I would like to remove the automatic generation of testsuite_files by default in the Makefile. In other words, remove "testsuite_files" from "all-local" in testsuite/Makefile.am. That will cause the testsuite to use the non-testsuite_files codepath for "casual" users; when V3 maintainers want to test particular tests, they can still create testsuite_files (by "make testsuite_files", or by listing the tests they want). Would that be acceptable?

Also, I would still appreciate it if you have a chance to investigate any of the other ideas I proposed for debugging the original problem. The `cat testsuite_files` solution should work; it's the usual DejaGNU way, and it works for all the other testsuites. It would be nice to understand what's going wrong for you, as it would eliminate this difference from the other testsuites.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
2005-03-23  Mark Mitchell  <mark@codesourcery.com>

	* testsuite/libstdc++-dg/normal.exp: Read testsuite_files, if it
	exists.

Index: libstdc++-dg/normal.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/libstdc++-dg/normal.exp,v
retrieving revision 1.6
diff -c -5 -p -r1.6 normal.exp
*** libstdc++-dg/normal.exp	23 Mar 2005 21:46:07 -0000	1.6
--- libstdc++-dg/normal.exp	24 Mar 2005 03:22:06 -0000
***************
*** 22,61 ****
  dg-init
  
  # Build the support objects.
  v3-build_support
  
- # Find directories that might have tests.
- set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
- foreach d [glob "$srcdir/\[a-z\]*"] {
-     if {[file isdirectory $d]} { 
- 	lappend subdirs $d
-     }
- }
- 
- # Find all the tests.
  set tests [list]
! foreach s $subdirs {
!     set subdir_tests [find $s *.cc]
!     # Filter out tests that should not be run.
!     foreach t $subdir_tests {
! 	# The DejaGNU "find" procedure sometimes returns a list 
! 	# containing an empty string, when it should realy return
! 	# an empty list.
! 	if { $t == "" } {
! 	    continue
  	}
! 	# Filter out:
! 	# 1. interactive tests.
! 	# 2. performance tests.
! 	# 3. wchar_t tests, if not supported.
! 	# 4. thread tests, if not supported. 
! 	if { [string first _xin $t] == -1
! 	     && [string first performance $t] == -1
! 	     && (${v3-wchar_t} || [string first wchar_t $t] == -1) 
!              && (${v3-threads} || [string first thread $t] == -1) } {
! 	    lappend tests $t
  	}
      }
  }
  set tests [lsort $tests]
  
--- 22,87 ----
  dg-init
  
  # Build the support objects.
  v3-build_support
  
  set tests [list]
! 
! # If there is a "testsuite_files" file, use it.
! #
! # This is a workaround for problems reported with using:
! #
! #   runtest normal.exp="`cat testsuite_files`"
! #
! # See:
! #  http://gcc.gnu.org/ml/libstdc++/2005-03/msg00278.html
! # for discussion of the problem.
! #
! # If that worked consistently, we could modify "make check" to
! # pass that option, and then remove this code.
! if {[info exists blddir]} {
!     set tests_file "${blddir}/testsuite/testsuite_files"
! }
! if {[info exists tests_file] && [file exists $tests_file]} {
!     set f [open $tests_file]
!     while { ! [eof $f] } {
! 	set t [gets $f]
! 	if { [string length "$t"] != 0 } {
! 	    lappend tests ${srcdir}/${t}
! 	}
!     } 
!     close $f
! } else {
!     # Find directories that might have tests.
!     set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
!     foreach d [glob "$srcdir/\[a-z\]*"] {
! 	if {[file isdirectory $d]} { 
! 	    lappend subdirs $d
  	}
!     }
!     # Find all the tests.
!     foreach s $subdirs {
! 	set subdir_tests [find $s *.cc]
! 	# Filter out tests that should not be run.
! 	foreach t $subdir_tests {
! 	    # The DejaGNU "find" procedure sometimes returns a list 
! 	    # containing an empty string, when it should really return
! 	    # an empty list.
! 	    if { $t == "" } {
! 		continue
! 	    }
! 	    # Filter out:
! 	    # 1. interactive tests.
! 	    # 2. performance tests.
! 	    # 3. wchar_t tests, if not supported.
! 	    # 4. thread tests, if not supported. 
! 	    if { [string first _xin $t] == -1
! 		 && [string first performance $t] == -1
! 		 && (${v3-wchar_t} || [string first wchar_t $t] == -1) 
! 		 && (${v3-threads} || [string first thread $t] == -1) } {
! 		lappend tests $t
! 	    }
  	}
      }
  }
  set tests [lsort $tests]
  

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