2 # check-testfiles.sh -- Check we distributed all the test files we need
3 # Copyright (C) 2007 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24 ls "${1}"/*/testsuite
/*/*"${2}" |
sed -e 's/.*\///' |
sort
28 makelist
"${distdir}" "$1" > dist
"${1}".txt
&&
29 makelist
"${srcdir}" "$1" > src
"${1}".txt
&&
30 diff src
"${1}".txt dist
"${1}".txt
31 rm -f src
"${1}".txt dist
"${1}".txt
37 distcount
=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l`
38 srccount
=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l`
39 if test $distcount -eq $srccount ; then
40 echo "All $srccount of the $suffix files are accounted for"
42 echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2
53 if test "$#" -gt 0 ; then
55 check_shipfiles
"$suffix"
59 echo "You did not specify any test file suffixes." >&2