ansible/docs/bin/testing_formatter.sh
John R Barker 80cc6417fa Docs: List of Sanity Tests (#52986)
* Improve sanity test docs, how to run sanity tests section
2019-02-26 11:27:39 -06:00

26 lines
705 B
Bash
Executable file

#!/bin/bash -eu
FILENAME=../docsite/rst/dev_guide/testing/sanity/index.rst
cat <<- EOF >$FILENAME.new
.. _all_sanity_tests:
Sanity Tests
============
The following sanity tests are available as \`\`--test\`\` options for \`\`ansible-test sanity\`\`.
This list is also available using \`\`ansible-test sanity --list-tests\`\`.
For information on how to run these tests, see :ref:\`sanity testing guide <testing_sanity>\`.
.. toctree::
:maxdepth: 1
$(for test in $(../../test/runner/ansible-test sanity --list-tests); do echo " ${test}"; done)
EOF
# Put file into place if it has changed
if [ "$(sha1sum <$FILENAME)" != "$(sha1sum <$FILENAME.new)" ]; then
mv -f $FILENAME.new $FILENAME
fi