2 # check-testfiles.sh -- Check we distributed all the test files we need
3 # Copyright (C) 2007, 2010, 2011 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 3 of the License, or
8 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
22 ls "${1}"/*/testsuite/*/*"${2}" | sed -e 's/.*\///' | sort
26 makelist "${distdir}" "$1" > dist"${1}".txt &&
27 makelist "${srcdir}" "$1" > src"${1}".txt &&
28 diff src"${1}".txt dist"${1}".txt
29 rm -f src"${1}".txt dist"${1}".txt
35 distcount=`ls ${distdir}/*/testsuite/*/*${suffix} | wc -l`
36 srccount=`ls ${srcdir}/*/testsuite/*/*${suffix} | wc -l`
37 if test $distcount -eq $srccount ; then
38 echo "All $srccount of the $suffix files are accounted for"
40 echo "ERROR: Missing $suffix files: source $srccount distributed $distcount" >&2
51 if test "$#" -gt 0 ; then
53 check_shipfiles "$suffix"
57 echo "You did not specify any test file suffixes." >&2