zeek/testing/btest/coverage/sphinx-broxygen-docs.sh
Jon Siwek 7e9d48f532 Remove broxygen Sphinx integration
The broxygen-generated files now live in the git repo, have tests
that check that they are up-to-date, and a script to re-generate
them on-demand.
2018-12-18 10:15:22 -06:00

33 lines
880 B
Bash

# This script checks whether the reST docs generated by broxygen are stale.
# If this test fails, then simply run:
#
# testing/scripts/gen-broxygen-docs.sh
#
# and then include the changes in your commit.
#
# @TEST-EXEC: bash $SCRIPTS/gen-broxygen-docs.sh ./doc
# @TEST-EXEC: bash %INPUT
function check_diff
{
local file=$1
echo "Checking $file for differences"
diff -Nru $file $DIST/$file 1>&2
if [ $? -ne 0 ]; then
echo "============================" 1>&2
echo "$DIST/$file is outdated" 1>&2
echo "Re-run the following command:" 1>&2
echo "" 1>&2
echo " $SCRIPTS/gen-broxygen-docs.sh" 1>&2
echo "" 1>&2
echo "And then include the changes in your commit" 1>&2
exit 1
fi
}
for file in $(find ./doc -name autogenerated-*); do
check_diff $file
done
check_diff ./doc/scripts