zeek/testing/btest/coverage/sphinx-broxygen-docs.sh
Jon Siwek b1b7027982 Merge remote-tracking branch 'origin/rtd-test'
* origin/rtd-test:
  Disable RTD pdf format due to exceeded capacity
  Add RTD pdf format
  Add RTD yaml config file
  Remove some Bro usages in main TOC entries
  Remove "contents" Sphinx directive usages
  Add a `make livehtml` target
  Use sourcecode Sphinx directive more widely
  Use Sphinx RTD theme for user manual
  Replace some code-block Sphinx directives
  Remove unused Sphinx extensions
  Remove broxygen Sphinx integration
  Remove Sphinx btest integrations and tests
  Fix a Sphinx deprecation

These are all changes required to build documentation from a static
Sphinx tree (e.g. on Read the Docs)
2019-01-10 14:08:40 -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 $DIST/$file $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