2016-01-12 13:08:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2012-11-14 21:25:20 +01:00
|
|
|
|
|
|
|
cd "$(dirname "$0")"/..
|
|
|
|
|
2017-01-01 13:37:38 +01:00
|
|
|
# read the options
|
2021-03-03 06:18:49 +01:00
|
|
|
TEMP=$(getopt -o "" --long skip-provision-check -- "$@")
|
2017-01-01 13:37:38 +01:00
|
|
|
eval set -- "$TEMP"
|
|
|
|
|
|
|
|
# extract options.
|
2020-10-15 04:55:57 +02:00
|
|
|
while true; do
|
2017-01-01 13:37:38 +01:00
|
|
|
case "$1" in
|
2021-03-03 06:18:49 +01:00
|
|
|
--skip-provision-check)
|
2021-03-02 20:59:19 +01:00
|
|
|
FORCEARG="--skip-provision-check"
|
2020-10-15 04:55:57 +02:00
|
|
|
shift
|
|
|
|
;;
|
2017-01-01 13:37:38 +01:00
|
|
|
--)
|
2020-10-15 04:55:57 +02:00
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
2017-01-01 13:37:38 +01:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2020-10-15 04:55:57 +02:00
|
|
|
function run() {
|
2013-08-09 17:29:31 +02:00
|
|
|
echo '----'
|
2018-08-03 02:14:50 +02:00
|
|
|
printf 'Running'
|
|
|
|
printf ' %q' "$@"
|
|
|
|
printf '\n'
|
2012-11-14 21:25:20 +01:00
|
|
|
if ! "$@"; then
|
2018-08-03 02:14:50 +02:00
|
|
|
printf '\n\e[31;1mFAILED\e[0m'
|
|
|
|
printf ' %q' "$@"
|
|
|
|
printf '\n'
|
2012-11-14 21:25:20 +01:00
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-04-28 01:34:17 +02:00
|
|
|
printf '\n\e[33;1m'
|
|
|
|
echo "Because test-all is very slow, we recommend running individual (sub)suites "
|
|
|
|
echo "and relying on CI to run the complete test suite for a fast edit-test cycle. See"
|
|
|
|
echo " https://zulip.readthedocs.io/en/latest/testing/testing.html#running-tests"
|
|
|
|
echo "for details on how to run just the relevant subsets of our tests."
|
|
|
|
printf '\e[0m'
|
|
|
|
echo
|
|
|
|
|
2017-07-25 04:37:23 +02:00
|
|
|
# prep
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/check-provision $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
|
2018-12-10 08:05:16 +01:00
|
|
|
# ci/backend
|
2019-06-21 18:40:38 +02:00
|
|
|
run ./tools/lint --groups=backend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-tools
|
2020-08-27 01:56:36 +02:00
|
|
|
run ./tools/test-backend --include-webhooks --ban-console-output $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-migrations
|
2017-05-30 20:19:53 +02:00
|
|
|
# Not running SVG optimizing since it's low-churn
|
2018-08-10 00:39:15 +02:00
|
|
|
# run ./tools/setup/optimize-svg
|
2020-04-21 19:01:54 +02:00
|
|
|
# Not running missing bot avatar detection since it's low churn
|
|
|
|
# ./tools/setup/generate_integration_bots_avatars.py --check-missing
|
2016-10-21 09:19:33 +02:00
|
|
|
# Not running documentation tests since it takes 20s and only tests documentation
|
|
|
|
# run ./tools/test-documentation
|
2017-10-09 12:00:05 +02:00
|
|
|
run ./tools/test-help-documentation $FORCEARG
|
2017-01-25 17:38:38 +01:00
|
|
|
run ./tools/test-api
|
2018-02-01 20:38:51 +01:00
|
|
|
# Not running requirements check locally, because slow and low-churn
|
|
|
|
# run ./tools/test-locked-requirements
|
2017-07-25 04:46:15 +02:00
|
|
|
# Not running run-dev tests locally; we never have
|
|
|
|
# run ./tools/test-run-dev
|
2017-07-25 04:37:23 +02:00
|
|
|
# Not running queue worker reload tests since it's low-churn code
|
|
|
|
# run ./tools/test-queue-worker-reload
|
|
|
|
|
2018-12-10 08:05:16 +01:00
|
|
|
# ci/frontend
|
2019-06-21 18:40:38 +02:00
|
|
|
run ./tools/lint --groups=frontend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-js-with-node
|
2021-01-20 19:39:32 +01:00
|
|
|
run ./tools/check-schemas
|
2017-08-27 22:42:54 +02:00
|
|
|
run ./manage.py makemessages --locale en
|
|
|
|
run env PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
|
|
|
|
run env PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
2020-03-26 21:00:05 +01:00
|
|
|
run ./tools/test-js-with-puppeteer $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
|
2012-11-14 21:25:20 +01:00
|
|
|
printf '\n\e[32mAll OK!\e[0m\n'
|