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-01-01 13:37:38 +01:00
|
|
|
run ./tools/check-provision $FORCEARG
|
2013-08-09 17:29:31 +02:00
|
|
|
run ./tools/clean-repo
|
2016-08-04 00:35:53 +02:00
|
|
|
run ./tools/test-tools
|
2017-04-21 23:07:06 +02:00
|
|
|
run ./tools/lint --pep8 $FORCEARG
|
2016-01-10 05:15:19 +01:00
|
|
|
run ./tools/test-migrations
|
2013-08-09 17:29:31 +02:00
|
|
|
run ./tools/test-js-with-node
|
2016-05-31 23:59:46 +02:00
|
|
|
run ./tools/run-mypy
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/test-backend $FORCEARG
|
|
|
|
run ./tools/test-js-with-casper $FORCEARG
|
2016-06-25 10:35:27 +02:00
|
|
|
# Not running queue worker reload tests since it's low-churn code
|
|
|
|
# run ./tools/test-queue-worker-reload
|
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
|
2012-11-14 21:25:20 +01:00
|
|
|
|
|
|
|
printf '\n\e[32mAll OK!\e[0m\n'
|