2019-12-10 16:34:03 +01:00
|
|
|
#!/bin/sh
|
2017-07-14 15:24:45 +02:00
|
|
|
|
2018-09-12 22:50:36 +02:00
|
|
|
FILENAME=../docsite/rst/dev_guide/testing/sanity/index.rst
|
|
|
|
|
|
|
|
cat <<- EOF >$FILENAME.new
|
2019-02-26 18:27:39 +01:00
|
|
|
.. _all_sanity_tests:
|
|
|
|
|
2017-07-14 15:24:45 +02:00
|
|
|
Sanity Tests
|
|
|
|
============
|
|
|
|
|
2018-03-14 20:44:21 +01:00
|
|
|
The following sanity tests are available as \`\`--test\`\` options for \`\`ansible-test sanity\`\`.
|
2019-03-21 06:14:22 +01:00
|
|
|
This list is also available using \`\`ansible-test sanity --list-tests --allow-disabled\`\`.
|
2018-03-14 20:44:21 +01:00
|
|
|
|
2019-02-26 18:27:39 +01:00
|
|
|
For information on how to run these tests, see :ref:\`sanity testing guide <testing_sanity>\`.
|
|
|
|
|
2018-03-14 20:44:21 +01:00
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
|
2019-08-05 22:29:50 +02:00
|
|
|
$(for test in $(../../bin/ansible-test sanity --list-tests --allow-disabled); do echo " ${test}"; done)
|
2017-07-14 15:24:45 +02:00
|
|
|
|
|
|
|
EOF
|
2018-09-12 22:50:36 +02:00
|
|
|
|
2019-12-10 16:34:03 +01:00
|
|
|
# By default use sha1sum which exists on Linux, if not present select the correct binary
|
|
|
|
# based on platform defaults
|
|
|
|
SHA_CMD="sha1sum"
|
|
|
|
if ! which ${SHA_CMD} > /dev/null 2>&1; then
|
|
|
|
if which sha1 > /dev/null 2>&1; then
|
|
|
|
SHA_CMD="sha1"
|
|
|
|
elif which shasum > /dev/null 2>&1; then
|
|
|
|
SHA_CMD="shasum"
|
|
|
|
else
|
|
|
|
# exit early with an error if no hashing binary can be found since it is required later
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-09-12 22:50:36 +02:00
|
|
|
# Put file into place if it has changed
|
2019-12-10 16:34:03 +01:00
|
|
|
if [ "$(${SHA_CMD} <$FILENAME)" != "$(${SHA_CMD} <$FILENAME.new)" ]; then
|
2018-09-12 22:50:36 +02:00
|
|
|
mv -f $FILENAME.new $FILENAME
|
|
|
|
fi
|