sanity: ensure all binaries are documented
* tests/sanity/bin.test: New file. * tests/Makefile.am: Run it.
This commit is contained in:
parent
22aba2c4e2
commit
586f0cce7b
2 changed files with 78 additions and 0 deletions
|
|
@ -409,6 +409,7 @@ endif
|
|||
|
||||
TESTS_sanity = \
|
||||
sanity/80columns.test \
|
||||
sanity/bin.test \
|
||||
sanity/includes.test \
|
||||
sanity/ipynb.pl \
|
||||
sanity/private.test \
|
||||
|
|
|
|||
77
tests/sanity/bin.test
Normal file
77
tests/sanity/bin.test
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
#! /bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2017 Laboratoire de Recherche et Développement de
|
||||
# l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
# Spot is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
# License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
set +x
|
||||
|
||||
exit_status=0
|
||||
|
||||
for binary in "$top_builddir"/bin/*
|
||||
do
|
||||
test -f "$binary" || continue
|
||||
test -x "$binary" || continue
|
||||
case $binary in
|
||||
*.py) continue
|
||||
esac
|
||||
binary=${binary##*/}
|
||||
|
||||
# All binaries should have a man page
|
||||
manpage=
|
||||
# Man pages are built in builddir, but as we distribute
|
||||
# them they may also be in srcdir.
|
||||
for man in "$top_srcdir"/bin/man/$binary.* \
|
||||
"$top_builddir"/bin/man/$binary.*; do
|
||||
case $man in
|
||||
*.[0-9]) manpage=${man##*/};;
|
||||
esac
|
||||
done
|
||||
if test -z $manpage; then
|
||||
echo "bin/$binary has no man page"
|
||||
exit_status=2
|
||||
else
|
||||
if ! grep -q "man/${manpage}.html" $top_srcdir/doc/org/tools.org; then
|
||||
echo "bin/man/$manpage is not listed in doc/org/tools.org"
|
||||
exit_status=2
|
||||
fi
|
||||
if ! grep -q "$manpage" $top_srcdir/bin/man/Makefile.am; then
|
||||
echo "bin/man/$manpage is not listed in man/Makefile.am"
|
||||
exit_status=2
|
||||
fi
|
||||
fi
|
||||
|
||||
# All man pages
|
||||
case $manpage in
|
||||
*.1)
|
||||
if ! test -f $top_srcdir/doc/org/$binary.org; then
|
||||
echo "bin/$binary has no doc/org/$binary.org page"
|
||||
exit_status=2
|
||||
else
|
||||
if ! grep -q "${binary}.org" $top_srcdir/doc/org/tools.org; then
|
||||
echo "${binary}.org is not listed in doc/org/tools.org page"
|
||||
exit_status=2
|
||||
fi
|
||||
if ! grep -q "${binary}.org" $top_srcdir/doc/Makefile.am; then
|
||||
echo "${binary}.org does not occur in doc/Makefile.am"
|
||||
exit_status=2
|
||||
fi
|
||||
fi
|
||||
esac
|
||||
done
|
||||
|
||||
exit $exit_status
|
||||
Loading…
Add table
Add a link
Reference in a new issue