gcc/libstdc++-v3/scripts/create_testsuite_files
Benjamin Kosnik e3f78d9b11 acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
2004-10-06  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_ENABLE_THREADS): Set enable_thread.
	(GLIBCXX_CONFIGURE_TESTSUITE): Use it.
	* configure: Regenerated.
	* testsuite/Makefile.am (CLEANFILES): Add TEST for
	check-performance executables.
	(stamp_thread): New.
	(all-local): Use it.
	* testsuite/Makefile.in: Regenerate.
	* scripts/create_testsuite_files: Filter thread tests.

	* testsuite/thread/pthread1.cc: Remove macro conditionals: this
	file will only be run by thread enabled configurations.
	* testsuite/thread/pthread7-rope.cc: Same, add rope_type typedef.
	* testsuite/thread/pthread6.cc: Same.
	* testsuite/thread/pthread5.cc: Same.
	* testsuite/thread/pthread4.cc: Same.
	* testsuite/thread/pthread3.cc: Same.
	* testsuite/thread/pthread2.cc: Same.

	* testsuite/ext/mt_allocator/instantiate.cc: Add in __GTHREADS guard.
	* testsuite/ext/mt_allocator/deallocate_global-1.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_global-3.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_local-1.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: ...here.
	* testsuite/ext/mt_allocator/deallocate_local-3.cc: Move to...
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: ...here.

From-SVN: r88628
2004-10-06 22:12:34 +00:00

69 lines
2.1 KiB
Bash
Executable File

#!/bin/sh
# Constructs lists of source files (full pathnames) to test. Two
# files are constructed: testsuite_files, which is used to test with
# the default dg-runtest command, and testsuite_files_interactive,
# which is used to test cases that require input to be entered. In
# addition, both lists are pruned of wchar_t tests if the toolchain
# under test does not support wchar_t functionality.
#
# We mimic the mkcheck script in that the first time this is run, all
# existing files are listed in "testsuite_files" in the output
# directory. Subsequent runs pull the list from that file, allowing
# users to trim the list down to problematic tests, or just run
# paticular directories or sub-directories of tests.
#
# Selecting individual tests can also be done with RUNTESTFLAGS, but
# that doesn't really do all that we are trying to accomplish here.
LC_ALL=C
export LC_ALL
# Both of these are in the appropriate testsuite subdirectories.
srcdir="$1"
outdir="$2"
tmp="${TMPDIR:-/tmp}/ctt$$"
tests_file_normal="$outdir/testsuite_files"
tests_file_inter="$outdir/testsuite_files_interactive"
tests_file_perf="$outdir/testsuite_files_performance"
cd $srcdir
# This is the ugly version of "everything but the current directory". It's
# what has to happen when find(1) doesn't support -mindepth, or -xtype.
dlist=`echo [0-9][0-9]*`
for d in [a-z]*; do
test -d $d && dlist="$dlist $d"
done
find $dlist "(" -type f -o -type l ")" -name "*.cc" -print | sort > $tmp.1
if test ! -s "$tmp.1"; then
exit 1
fi
# If the library is not configured to support wchar_t, don't run those tests.
if test -f "$outdir/testsuite_wchar_t"; then
mv $tmp.1 $tmp.2
else
grep -v wchar_t $tmp.1 > $tmp.2
fi
# If the library is not configured to support threads, don't run those tests.
if test -f "$outdir/testsuite_thread"; then
mv $tmp.2 $tmp.3
else
grep -v thread $tmp.2 > $tmp.3
fi
# Now filter out classes of tests. These classes are run using special rules.
grep _xin $tmp.3 > $tests_file_inter
grep -v _xin $tmp.3 > $tmp.4
grep performance $tmp.4 > $tests_file_perf
grep -v performance $tmp.4 > $tmp.5
# ...more filters go here.
cp $tmp.5 $tests_file_normal
rm $tmp*
exit 0