Files
zulip/tools/test-all
Greg Price e469578a55 py3: Fix up (almost) all script invocations to rely on shebangs.
This follows up on 207cf6302 from last year to clean up cases that
have apparently popped up since then.  Invoking the scripts directly
makes a cleaner command line in any case, and moreover is essential
to how we control running a Zulip install as either Python 2 or 3
(soon, how we always ensure it runs as Python 3.)

One exception: we're currently forcing `provision` in dev to run
Python 3, while still running both Python 2 and Python 3 jobs in CI.
We use a non-shebang invocation to do the forcing of Python 3.
2017-08-15 17:30:31 -07:00

66 lines
1.5 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
cd "$(dirname "$0")"/..
# read the options
TEMP=`getopt -o f --long force -- "$@"`
eval set -- "$TEMP"
# extract options.
while true ; do
case "$1" in
-f|--force)
FORCEARG="--force";
shift;;
--)
shift;
break;;
esac
done
function run {
echo '----'
echo "Running $@"
if ! "$@"; then
printf "\n\e[31;1mFAILED\e[0m $@\n"
exit 1
else
echo
fi
}
# prep
run ./tools/check-provision $FORCEARG
run ./tools/clean-repo
# travis/static-analysis
run ./tools/run-mypy
# Not running check-py3 because it demands a clean Git worktree.
# run ./tools/check-py3
# travis/backend
run ./tools/lint --pep8 $FORCEARG
run ./manage.py makemessages --locale en
run PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
run PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
run ./tools/test-tools
run ./tools/test-backend $FORCEARG
run ./tools/test-migrations
# Not running SVG optimizing since it's low-churn
# run ./tools/optimize-svg
# Not running documentation tests since it takes 20s and only tests documentation
# run ./tools/test-documentation
run ./tools/test-help-documentation.py $FORCEARG
run ./tools/test-api
# Not running run-dev tests locally; we never have
# run ./tools/test-run-dev
# Not running queue worker reload tests since it's low-churn code
# run ./tools/test-queue-worker-reload
# travis/frontend
run ./tools/test-js-with-node
run ./tools/test-js-with-casper $FORCEARG
printf '\n\e[32mAll OK!\e[0m\n'