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
|
|
|
|
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
|
|
|
|
|
2012-11-14 21:25:20 +01:00
|
|
|
function run {
|
2013-08-09 17:29:31 +02:00
|
|
|
echo '----'
|
|
|
|
echo "Running $@"
|
2012-11-14 21:25:20 +01:00
|
|
|
if ! "$@"; then
|
2013-08-09 17:29:31 +02:00
|
|
|
printf "\n\e[31;1mFAILED\e[0m $@\n"
|
2012-11-14 21:25:20 +01:00
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-07-25 04:37:23 +02:00
|
|
|
# prep
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/check-provision $FORCEARG
|
2013-08-09 17:29:31 +02:00
|
|
|
run ./tools/clean-repo
|
2017-07-25 04:37:23 +02:00
|
|
|
|
|
|
|
# travis/backend
|
2017-08-30 00:21:55 +02:00
|
|
|
run ./tools/lint --backend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-tools
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/test-backend $FORCEARG
|
2017-10-04 20:54:23 +02:00
|
|
|
run ./tools/run-mypy $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
|
|
|
|
# run ./tools/optimize-svg
|
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-01-01 13:37:38 +01:00
|
|
|
run ./tools/test-help-documentation.py $FORCEARG
|
2017-01-25 17:38:38 +01:00
|
|
|
run ./tools/test-api
|
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
|
|
|
|
|
|
|
|
# travis/frontend
|
2017-08-30 00:21:55 +02:00
|
|
|
run ./tools/lint --frontend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-js-with-node
|
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
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-js-with-casper $FORCEARG
|
|
|
|
|
2012-11-14 21:25:20 +01:00
|
|
|
printf '\n\e[32mAll OK!\e[0m\n'
|