]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* testsuite/lib/libstdc++.exp (libstdc++_init): Search the path
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Jan 2005 18:57:59 +0000 (18:57 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Jan 2005 18:57:59 +0000 (18:57 +0000)
for the compiler.  Don't set cxxflags.
(v3_target_compile): Search for libv3test.a relative to $objdir.
(lsearch_all_inline): New.
(lsearch_all_inline_not): New.
(v3-list-tests): Rewrite to not need generated files.
* testsuite/Makefile.am (IGNORE_WCHAR_T): New.
(IGNORE_THREAD): New.
(TESTS_TO_IGNORE): New.
(site.exp): Set tests_to_ignore, cxxflags.
* aclocal.m4: Regenerate.
* Makefile.in: Regenerate.
* libmath/Makefile.in: Likewise.
* libsupc++/Makefile.in: Likewise.
* po/Makefile.in: Likewise.
* src/Makefile.in: Likewise.
* testsuite/Makefile.in: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94384 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/Makefile.in
libstdc++-v3/aclocal.m4
libstdc++-v3/include/Makefile.in
libstdc++-v3/libmath/Makefile.in
libstdc++-v3/libsupc++/Makefile.in
libstdc++-v3/po/Makefile.in
libstdc++-v3/src/Makefile.in
libstdc++-v3/testsuite/Makefile.am
libstdc++-v3/testsuite/Makefile.in
libstdc++-v3/testsuite/lib/libstdc++.exp

index eda22a8d56755ce4ae870136330db95f31e6056a..e823fd872a18e89dd49cd637f8cf754338a0cd32 100644 (file)
@@ -1,3 +1,23 @@
+2005-01-28  Geoffrey Keating  <geoffk@apple.com>
+
+       * testsuite/lib/libstdc++.exp (libstdc++_init): Search the path
+       for the compiler.  Don't set cxxflags.
+       (v3_target_compile): Search for libv3test.a relative to $objdir.
+       (lsearch_all_inline): New.
+       (lsearch_all_inline_not): New.
+       (v3-list-tests): Rewrite to not need generated files.
+       * testsuite/Makefile.am (IGNORE_WCHAR_T): New.
+       (IGNORE_THREAD): New.
+       (TESTS_TO_IGNORE): New.
+       (site.exp): Set tests_to_ignore, cxxflags.
+       * aclocal.m4: Regenerate.
+       * Makefile.in: Regenerate.
+       * libmath/Makefile.in: Likewise.
+       * libsupc++/Makefile.in: Likewise.
+       * po/Makefile.in: Likewise.
+       * src/Makefile.in: Likewise.
+       * testsuite/Makefile.in: Likewise.
+
 2005-01-28  Paolo Carlini  <pcarlini@suse.de>
 
        * include/tr1/type_traits: Implement is_empty.
index 72e4b6ca78068399a750a948e22bc06d1850cc02..b6903d3b06d932c9b83e47c2bc3df397d05e039f 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index 0111a59f978e2a30ec40a4690215dabb253daf7c..b67612a625777c82e949296fcdd0391a3c642108 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.4 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
 # Free Software Foundation, Inc.
@@ -40,7 +40,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
 # Call AM_AUTOMAKE_VERSION so it can be traced.
 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-        [AM_AUTOMAKE_VERSION([1.9.3])])
+        [AM_AUTOMAKE_VERSION([1.9.4])])
 
 # AM_AUX_DIR_EXPAND
 
index 6bdf5010ec37eade7bfa62abd6d76235ad9506f2..8a67dcb3104b84a35e96fe15840ebdd7534fe05b 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index 0034dffbdc6b50483f94dfcf4559344c30fb024a..8c00c66301c94dc09499e716ade8ff23dd2fb45e 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index 2e48b9b033867009cc5949ee2db9cdfc38be4307..2a98d68fb93129e978dc0187884956f0af84e7a7 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index 5a4b20c29be116ff1a10a2624b529fc764f0dbb5..cc9b4dbdf20080a01395ef4e9dbcb05a2752dc1d 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index c8ac76078b65e6245df04156e09c0618d391565b..a5b670dced483105c8b1352fe532fb70af900058 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
index 1baeb826c4bbe5d592ecc5f1b76a98a6fe2a7bc1..436f0bbad79becc4c0d5e79e697596a36e2066e7 100644 (file)
@@ -62,17 +62,21 @@ all-local: stamp_wchar stamp_thread testsuite_files
 
 # Enable wchar_t tests if capable.
 if GLIBCXX_TEST_WCHAR_T
+IGNORE_WCHAR_T = 
 stamp_wchar:
        touch testsuite_wchar_t
 else
+IGNORE_WCHAR_T = *wchar_t*
 stamp_wchar:
 endif
 
 # Enable thread tests if capable.
 if GLIBCXX_TEST_THREAD
+IGNORE_THREAD = 
 stamp_thread:
        touch testsuite_thread
 else
+IGNORE_THREAD = *thread*
 stamp_thread:
 endif
 
@@ -83,6 +87,7 @@ lists_of_files = \
    testsuite_files_interactive \
    testsuite_files_performance
 
+TESTS_TO_IGNORE = $(IGNORE_WCHAR_T) $(IGNORE_THREAD)
 
 # We need more things in site.exp, but automake completely controls the
 # creation of that file; there's no way to append to it without messing up
@@ -103,6 +108,8 @@ site.exp: Makefile
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
        @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+       @echo 'set tests_to_ignore [list $(TESTS_TO_IGNORE)]' >> site.tmp
+       @echo 'set cxxflags { $(AM_CXXFLAGS) }' >> site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
        @test ! -f site.exp || \
          sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
index 4201ab9256de539fc991c2c279a15ae3a047825d..96c4563ec3828f43266f7533419bd81785231148 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.3 from Makefile.am.
+# Makefile.in generated by automake 1.9.4 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -286,6 +286,14 @@ libv3test_a_SOURCES = \
 
 abi_check_SOURCES = abi_check.cc
 abi_check_DEPENDENCIES = libv3test.a
+@GLIBCXX_TEST_WCHAR_T_FALSE@IGNORE_WCHAR_T = *wchar_t*
+
+# Enable wchar_t tests if capable.
+@GLIBCXX_TEST_WCHAR_T_TRUE@IGNORE_WCHAR_T = 
+@GLIBCXX_TEST_THREAD_FALSE@IGNORE_THREAD = *thread*
+
+# Enable thread tests if capable.
+@GLIBCXX_TEST_THREAD_TRUE@IGNORE_THREAD = 
 
 # Generated lists of files to run.  All of these names are valid make
 # targets, if you wish to generate a list manually.
@@ -294,6 +302,7 @@ lists_of_files = \
    testsuite_files_interactive \
    testsuite_files_performance
 
+TESTS_TO_IGNORE = $(IGNORE_WCHAR_T) $(IGNORE_THREAD)
 baseline_file = ${baseline_dir}/baseline_symbols.txt
 extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
 
@@ -581,13 +590,9 @@ uninstall-am: uninstall-info-am
 
 
 all-local: stamp_wchar stamp_thread testsuite_files
-
-# Enable wchar_t tests if capable.
 @GLIBCXX_TEST_WCHAR_T_TRUE@stamp_wchar:
 @GLIBCXX_TEST_WCHAR_T_TRUE@    touch testsuite_wchar_t
 @GLIBCXX_TEST_WCHAR_T_FALSE@stamp_wchar:
-
-# Enable thread tests if capable.
 @GLIBCXX_TEST_THREAD_TRUE@stamp_thread:
 @GLIBCXX_TEST_THREAD_TRUE@     touch testsuite_thread
 @GLIBCXX_TEST_THREAD_FALSE@stamp_thread:
@@ -611,6 +616,8 @@ site.exp: Makefile
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
        @echo 'set target_triplet $(target_triplet)' >>site.tmp
        @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+       @echo 'set tests_to_ignore [list $(TESTS_TO_IGNORE)]' >> site.tmp
+       @echo 'set cxxflags { $(AM_CXXFLAGS) }' >> site.tmp
        @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
        @test ! -f site.exp || \
          sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
index d2996855584d991bc0232244e7215b948ba2b06c..d187595ec48a752fb65a61aa7afdcc22c91e1851 100644 (file)
@@ -79,7 +79,7 @@ proc v3-copy-files {srcfiles} {
 proc libstdc++_init { testfile } {
     global env
     global srcdir blddir objdir tool_root_dir
-    global cxx cxxflags
+    global cxx
     global includes
     global gluefile wrap_flags
     global ld_library_path
@@ -137,17 +137,17 @@ proc libstdc++_init { testfile } {
     append ld_library_path ":${gccdir}"
     set compiler ${gccdir}/g++
     if { [is_remote host] == 0 && [which $compiler] != 0 } {
-      foreach i "[exec $compiler --print-multi-lib]" {
-        set mldir ""
-        regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
-        set mldir [string trimright $mldir "\;@"]
-        if { "$mldir" == "." } {
-          continue
-        }
-        if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
-          append ld_library_path ":${gccdir}/${mldir}"
-        }
-      }
+       foreach i "[exec [which $compiler] --print-multi-lib]" {
+           set mldir ""
+           regexp -- "\[a-z0-9=/\.-\]*;" $i mldir
+           set mldir [string trimright $mldir "\;@"]
+           if { "$mldir" == "." } {
+               continue
+           }
+           if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]] >= 1 } {
+               append ld_library_path ":${gccdir}/${mldir}"
+           }
+       }
     }
     append ld_library_path ":${blddir}/src/.libs"
 
@@ -165,17 +165,14 @@ proc libstdc++_init { testfile } {
             return "untested"
         }
       set cxx [transform "g++"]
-      set cxxflags "-ggdb3"
       set includes "-I./"
     } else {
         # If we find a testsuite_flags file, we're testing in the build dir.
         if { [file exists $flags_file] } {
             set cxx [exec sh $flags_file --build-cxx]
-            set cxxflags [exec sh $flags_file --cxxflags]
             set includes [exec sh $flags_file --build-includes]
         } else {
             set cxx [transform "g++"]
-            set cxxflags "-ggdb3"
             set includes "-I${srcdir}"
         }
     }
@@ -249,7 +246,7 @@ proc v3_target_compile { source dest type options } {
     global cxx
     global cxxflags
     global includes
-    global blddir
+    global objdir
 
     if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
         lappend options "libs=${gluefile}"
@@ -266,37 +263,56 @@ proc v3_target_compile { source dest type options } {
 
     # Picks up the freshly-built testsuite library corresponding to the
     # multilib under test.
-    lappend options "ldflags=-L${blddir}/testsuite"
+    lappend options "ldflags=-L${objdir}"
     lappend options "libs=-lv3test"
 
     return [target_compile $source $dest $type $options]
 }
 
 
+# This is the equivalent of the Tcl 8.4 "lsearch -all -inline" except
+# slower
+proc lsearch_all_inline {listData pattern} {
+    set result [list]
+    foreach item $listData {
+        if {[string match $pattern $item]} {
+            lappend result $item
+        }
+    }
+    return $result
+}
+
+# This is the equivalent of the Tcl 8.4 "lsearch -all -inline -not"
+# except slower
+proc lsearch_all_inline_not {listData pattern} {
+    set result [list]
+    foreach item $listData {
+        if {! [string match $pattern $item]} {
+            lappend result $item
+        }
+    }
+    return $result
+}
+
 # Called once, from libstdc++/normal.exp.
 proc v3-list-tests { filename } {
-    global srcdir
-    global blddir
-
-    set tests_file "${blddir}/testsuite/${filename}"
-    set sfiles ""
-
-    verbose -log "In v3-list-tests"
-    verbose -log "blddir = ${blddir}"
-    verbose -log "tests_file = $tests_file"
-
-    # If there is a testsuite_file, use it. 
-    if { [file exists $tests_file] } {
-        set f [open $tests_file]
-        while { ! [eof $f] } {
-            set t [gets $f]
-            if { [string length "$t"] != 0 } {
-                lappend sfiles  ${srcdir}/${t}
-            }
-        } 
-        close $f
+    global srcdir tests_to_ignore
+
+    set sfiles [lsort [ find $srcdir "*.cc"] ]
+    set sfiles [ lsearch_all_inline $sfiles "$srcdir/*/*.cc" ]
+    foreach pattern $tests_to_ignore {
+       set sfiles [ lsearch_all_inline_not $sfiles $pattern ]
+    }
+    if { $filename == "testsuite_files" } {
+       set sfiles [ lsearch_all_inline_not $sfiles *_xin* ]
+       set sfiles [ lsearch_all_inline_not $sfiles *performance* ]
+    } elseif { $filename == "testsuite_files_interactive" } {
+       set sfiles [ lsearch_all_inline $sfiles *_xin* ]
+    } elseif { $filename == "testsuite_files_performance" } {
+       set sfiles [ lsearch_all_inline $sfiles *performance* ]
     } else {
-        verbose "cannot open $tests_file"
+        verbose "cannot compute list of tests named $filename"
+       set sfiles [list]
     }
     return $sfiles
 }