* gfortran.fortran-torture/execute/specfics.f90: Use correct typing.
[official-gcc.git] / libstdc++-v3 / scripts / create_testsuite_files
blob7ebcef5a010d64dca7d07c4b5232691f543f20d3
1 #!/bin/sh
3 # Constructs lists of source files (full pathnames) to test. Two
4 # files are constructed: testsuite_files, which is used to test with
5 # the default dg-runtest command, and testsuite_files_interactive,
6 # which is used to test cases that require input to be entered. In
7 # addition, both lists are pruned of wchar_t tests if the toolchain
8 # under test does not support wchar_t functionality.
10 # We mimic the mkcheck script in that the first time this is run, all
11 # existing files are listed in "testsuite_files" in the output
12 # directory. Subsequent runs pull the list from that file, allowing
13 # users to trim the list down to problematic tests, or just run
14 # paticular directories or sub-directories of tests.
16 # Selecting individual tests can also be done with RUNTESTFLAGS, but
17 # that doesn't really do all that we are trying to accomplish here.
19 LC_ALL=C
20 export LC_ALL
22 # Both of these are in the appropriate testsuite subdirectories.
23 srcdir="$1"
24 outdir="$2"
26 tmp="${TMPDIR:-/tmp}/ctt$$"
27 tests_file_normal="$outdir/testsuite_files"
28 tests_file_inter="$outdir/testsuite_files_interactive"
29 tests_file_perf="$outdir/testsuite_files_performance"
31 cd $srcdir
32 # This is the ugly version of "everything but the current directory". It's
33 # what has to happen when find(1) doesn't support -mindepth, or -xtype.
34 dlist=`echo [0-9][0-9]*`
35 for d in [a-z]*; do
36 test -d $d && dlist="$dlist $d"
37 done
38 find $dlist "(" -type f -o -type l ")" -name "*.cc" | sort > $tmp.1
39 if test ! -s "$tmp.1"; then
40 exit 1
43 # If the library is not configured to support wchar_t, don't run those tests.
44 if test -f "$outdir/testsuite_wchar_t"; then
45 mv $tmp.1 $tmp.2
46 else
47 grep -v wchar_t $tmp.1 > $tmp.2
50 # Now filter out classes of tests. These classes are run using special rules.
51 grep _xin $tmp.2 > $tests_file_inter
52 grep -v _xin $tmp.2 > $tmp.3
54 grep performance $tmp.3 > $tests_file_perf
55 grep -v performance $tmp.3 > $tmp.4
57 # ...more filters go here.
58 cp $tmp.4 $tests_file_normal
60 rm $tmp*
61 exit 0