2005-11-22 07:54:08 +01:00
|
|
|
# Functional and regression tests in C++ for libstdc++.
|
2001-05-12 19:49:16 +02:00
|
|
|
|
2016-01-04 15:30:50 +01:00
|
|
|
# Copyright (C) 2001-2016 Free Software Foundation, Inc.
|
2004-02-27 23:01:32 +01:00
|
|
|
#
|
2001-05-12 19:49:16 +02:00
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2009-04-09 17:00:19 +02:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2001-05-12 19:49:16 +02:00
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2009-04-09 17:00:19 +02:00
|
|
|
# along with this program; see the file COPYING3. If not see
|
|
|
|
# <http://www.gnu.org/licenses/>.
|
2001-05-12 19:49:16 +02:00
|
|
|
|
|
|
|
# libstdc++-v3 testsuite that uses the 'dg.exp' driver.
|
|
|
|
|
2003-12-22 21:09:23 +01:00
|
|
|
# Initialization.
|
|
|
|
dg-init
|
2001-05-12 19:49:16 +02:00
|
|
|
|
2005-03-23 17:45:45 +01:00
|
|
|
# Build the support objects.
|
2005-03-23 22:46:07 +01:00
|
|
|
v3-build_support
|
2005-03-23 17:45:45 +01:00
|
|
|
|
|
|
|
set tests [list]
|
2005-03-24 05:26:30 +01:00
|
|
|
|
|
|
|
# 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}
|
2005-03-23 17:45:45 +01:00
|
|
|
}
|
2005-03-24 05:26:30 +01:00
|
|
|
}
|
|
|
|
close $f
|
|
|
|
} else {
|
|
|
|
# Find directories that might have tests.
|
|
|
|
set subdirs [glob "$srcdir/\[0-9\]\[0-9\]*"]
|
2006-10-10 01:53:35 +02:00
|
|
|
lappend subdirs "$srcdir/abi"
|
2006-06-07 16:58:24 +02:00
|
|
|
lappend subdirs "$srcdir/backward"
|
|
|
|
lappend subdirs "$srcdir/ext"
|
|
|
|
lappend subdirs "$srcdir/performance"
|
2006-10-10 01:53:35 +02:00
|
|
|
lappend subdirs "$srcdir/tr1"
|
[multiple changes]
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* gcc/c-family/c-common.c (c_common_reswords): Add __bases,
__direct_bases.
* gcc/c-family/c-common.h: Add RID_BASES and RID_DIRECT_BASES.
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* cp-tree.def: Add BASES as a new tree code.
* cp-tree.h (enum cp_trait_kind): Add CPTK_BASES, CPTK_DIRECT_BASES.
(BASES_TYPE, BASES_DIRECT): Define.
(calculate_bases, finish_bases, calculate_direct_bases): Declare.
* parser.c (cp_parser_trait_expr, cp_parser_template_argument_list,
(cp_parser_simple_type_specifier, cp_parser_save_nsdmi): Use them.
* pt.c (find_parameter_packs_r, tsubst_pack_expansion): Likewise.
* semantics.c (calculate_bases, finish_bases, calculate_direct_bases,
dfs_calculate_bases_pre, dfs_calculate_bases_post,
calculate_bases_helper): Define.
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* g++.dg/ext/bases.C: New test.
2011-10-17 Michael Spertus <mike_spertus@symantec.com>
* include/tr2/type_traits (bases, direct_bases, typelist): New.
2011-10-17 Benjamin Kosnik <bkoz@redhat.com>
* libstdc++-v3/include/Makefile.am: Add tr2 directory and includes.
* libstdc++-v3/include/Makefile.in: Regenerate.
* scripts/create_testsuite_files: Search tr2 directory.
* testsuite/libstdc++-dg/conformance.exp: Same.
* testsuite/tr2/bases/requirements/explicit_instantiation.cc: New.
* testsuite/tr2/bases/requirements/typedefs.cc: New.
* testsuite/tr2/bases/value.cc: New.
* testsuite/tr2/direct_bases/requirements/
explicit_instantiation.cc: New.
* testsuite/tr2/direct_bases/requirements/typedefs.cc: New.
* testsuite/tr2/direct_bases/value.cc: New.
From-SVN: r180121
2011-10-18 04:58:06 +02:00
|
|
|
lappend subdirs "$srcdir/tr2"
|
2009-10-05 19:42:00 +02:00
|
|
|
lappend subdirs "$srcdir/decimal"
|
2013-11-01 21:08:39 +01:00
|
|
|
lappend subdirs "$srcdir/experimental"
|
2016-01-14 19:12:43 +01:00
|
|
|
lappend subdirs "$srcdir/special_functions"
|
2006-06-07 16:58:24 +02:00
|
|
|
verbose "subdirs are $subdirs"
|
|
|
|
|
2005-03-24 05:26:30 +01:00
|
|
|
# Find all the tests.
|
|
|
|
foreach s $subdirs {
|
|
|
|
set subdir_tests [find $s *.cc]
|
2005-11-22 07:54:08 +01:00
|
|
|
set subdir_tests_c [find $s *.c]
|
|
|
|
foreach e $subdir_tests_c {
|
|
|
|
lappend subdir_tests $e
|
|
|
|
}
|
|
|
|
|
2005-03-24 05:26:30 +01:00
|
|
|
# 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:
|
2006-06-07 16:58:24 +02:00
|
|
|
# 0. utilities, other parts of the testing infrastructure.
|
2005-03-24 05:26:30 +01:00
|
|
|
# 1. interactive tests.
|
|
|
|
# 2. performance tests.
|
|
|
|
# 3. wchar_t tests, if not supported.
|
|
|
|
# 4. thread tests, if not supported.
|
2010-10-07 23:44:36 +02:00
|
|
|
# 5. *_filebuf, if file I/O is not supported.
|
2005-03-24 05:26:30 +01:00
|
|
|
if { [string first _xin $t] == -1
|
|
|
|
&& [string first performance $t] == -1
|
|
|
|
&& (${v3-wchar_t} || [string first wchar_t $t] == -1)
|
2010-10-07 23:44:36 +02:00
|
|
|
&& (${v3-threads} || [string first thread $t] == -1)
|
|
|
|
&& ([string first "_filebuf" $t] == -1
|
|
|
|
|| [check_v3_target_fileio]) } {
|
2005-03-24 05:26:30 +01:00
|
|
|
lappend tests $t
|
|
|
|
}
|
2005-03-23 17:45:45 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
set tests [lsort $tests]
|
|
|
|
|
2001-05-12 19:49:16 +02:00
|
|
|
# Main loop.
|
2004-02-27 23:01:32 +01:00
|
|
|
global DEFAULT_CXXFLAGS
|
2005-05-27 18:24:59 +02:00
|
|
|
global PCH_CXXFLAGS
|
|
|
|
dg-runtest $tests "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
|
2001-05-12 19:49:16 +02:00
|
|
|
|
|
|
|
# All done.
|
|
|
|
dg-finish
|