| 1 |
#!/bin/sh |
| 2 |
|
| 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. |
| 9 |
# |
| 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 |
# particular directories or sub-directories of tests. |
| 15 |
# |
| 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. |
| 18 |
|
| 19 |
LC_ALL=C |
| 20 |
export LC_ALL |
| 21 |
|
| 22 |
# Both of these are in the appropriate testsuite subdirectories. |
| 23 |
srcdir="$1" |
| 24 |
outdir="$2" |
| 25 |
|
| 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" |
| 30 |
tests_file_simd="$outdir/testsuite_files_simd" |
| 31 |
|
| 32 |
cd $srcdir |
| 33 |
# This is the ugly version of "everything but the current directory". It's |
| 34 |
# what has to happen when find(1) doesn't support -mindepth, or -xtype. |
| 35 |
# The directories here should be consistent with libstdc++-dg/conformance.exp |
| 36 |
dlist=`echo [0-9][0-9]*` |
| 37 |
dlist="$dlist std abi backward ext performance tr1 tr2 decimal experimental" |
| 38 |
dlist="$dlist special_functions" |
| 39 |
find $dlist "(" -type f -o -type l ")" -name "*.cc" -print > $tmp.01 |
| 40 |
find $dlist "(" -type f -o -type l ")" -name "*.c" -print > $tmp.02 |
| 41 |
cat $tmp.01 $tmp.02 | sort > $tmp.1 |
| 42 |
if test ! -s "$tmp.1"; then |
| 43 |
exit 1 |
| 44 |
fi |
| 45 |
|
| 46 |
# Now filter out classes of tests. These classes are run using special rules. |
| 47 |
grep _xin $tmp.1 > $tests_file_inter |
| 48 |
grep -v _xin $tmp.1 > $tmp.4 |
| 49 |
|
| 50 |
grep performance $tmp.4 > $tests_file_perf |
| 51 |
grep -v performance $tmp.4 > $tmp.5 |
| 52 |
|
| 53 |
grep simd/tests/ $tmp.5 > $tests_file_simd |
| 54 |
grep -v simd/tests/ $tmp.5 > $tmp.6 |
| 55 |
|
| 56 |
# ...more filters go here. |
| 57 |
cp $tmp.6 $tests_file_normal |
| 58 |
|
| 59 |
rm $tmp* |
| 60 |
exit 0 |