This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: More testsuite cleanup
- From: Mark Mitchell <mark at codesourcery dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 3 Apr 2005 18:05:17 -0700
- Subject: PATCH: More testsuite cleanup
- Reply-to: mark at codesourcery dot com
At present, V3's "make check" use a "check-local" rule to run the ABI
test. Since the ABI test is now run by DejaGNU, we can eliminate that
rule -- if we move the build of current_symbols.txt into DejaGNU,
which makes sense anyhow. This patch implements that strategy.
This also fixes a defect in my previous patches. In particular, we
now run the ordinary "make check", and then (because of the make
dependencies), run just the ABI test, which overwrites the .sum/.log
files created by the original "make check". By removing the
"check-local" rule (but leaving "check-abi" so that people can run
just that manually), we also avoid this problem.
I will apply this patch after 24 hours, if there are no objections.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2005-04-03 Mark Mitchell <mark@codesourcery.com>
* testsuite/Makefile.am (check-local): Remove.
(curent_symbols.txt): Likewise.
(check-abi): Do not depend on current_symbols.txt.
* libstdc++-abi/abi.exp: Build current_symbols.txt.
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/Makefile.am,v
retrieving revision 1.45
diff -c -5 -p -r1.45 Makefile.am
*** Makefile.am 1 Apr 2005 20:20:21 -0000 1.45
--- Makefile.am 4 Apr 2005 00:54:47 -0000
*************** site.exp: Makefile
*** 101,119 ****
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
- # This is automatically run after the generated check-DEJAGNU rule.
- check-local: check-abi
-
baseline_file = ${baseline_dir}/baseline_symbols.txt
extract_symvers = $(glibcxx_srcdir)/scripts/extract_symvers
- current_symbols.txt: ${extract_symvers} ../src/.libs/libstdc++.so
- -@(${extract_symvers} ../src/.libs/libstdc++.so current_symbols.txt)
-
baseline_symbols:
-@(output=${baseline_file}; \
if test ! -f $${output}; then \
echo "Baseline file doesn't exist."; \
echo "Try 'make new-abi-baseline' to create it."; \
--- 101,113 ----
*************** new-abi-baseline:
*** 131,141 ****
${extract_symvers} ../src/.libs/libstdc++.so $${output})
if GLIBCXX_TEST_ABI
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
! check-abi: baseline_symbols current_symbols.txt site.exp
-@runtest --tool libstdc++ abi.exp
else
check-abi:
endif
--- 125,135 ----
${extract_symvers} ../src/.libs/libstdc++.so $${output})
if GLIBCXX_TEST_ABI
# Use 'new-abi-baseline' to create an initial symbol file. Then run
# 'check-abi' to test for changes against that file.
! check-abi: baseline_symbols site.exp
-@runtest --tool libstdc++ abi.exp
else
check-abi:
endif
Index: libstdc++-abi/abi.exp
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/libstdc++-abi/abi.exp,v
retrieving revision 1.1
diff -c -5 -p -r1.1 abi.exp
*** libstdc++-abi/abi.exp 1 Apr 2005 20:20:22 -0000 1.1
--- libstdc++-abi/abi.exp 4 Apr 2005 00:54:47 -0000
***************
*** 12,26 ****
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! # If there is no current_symbols.txt file, then skip this test.
! if { ![file exists "current_symbols.txt"] } {
return
}
# Build the support objects.
v3-build_support
# Build the abi_check program.
if { [v3_target_compile "$srcdir/abi_check.cc" "abi_check" \
--- 12,33 ----
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! # If there is no baseline file, or we can't find the library, skip
! # this test.
! if { ![info exists baseline_file] \
! || ![file exists $baseline_file] \
! || ![file exists "../src/.libs/libstdc++.so"] } {
return
}
+ # Figure out what symbols are defined by the active build of the library.
+ remote_exec "build" "$srcdir/../scripts/extract_symvers" \
+ [list "../src/.libs/libstdc++.so" "current_symbols.txt"]
+
# Build the support objects.
v3-build_support
# Build the abi_check program.
if { [v3_target_compile "$srcdir/abi_check.cc" "abi_check" \