forked from zulip/zulip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-all
executable file
·78 lines (69 loc) · 2.21 KB
/
test-all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/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 '----'
printf 'Running'
printf ' %q' "$@"
printf '\n'
if ! "$@"; then
printf '\n\e[31;1mFAILED\e[0m'
printf ' %q' "$@"
printf '\n'
exit 1
else
echo
fi
}
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
# prep
run ./tools/check-provision $FORCEARG
run ./tools/clean-repo
# ci/backend
run ./tools/lint --groups=backend $FORCEARG
run ./tools/test-tools
run ./tools/test-backend --include-webhooks --ban-console-output $FORCEARG
run ./tools/test-migrations
# Not running SVG optimizing since it's low-churn
# run ./tools/setup/optimize-svg
# Not running missing bot avatar detection since it's low churn
# ./tools/setup/generate_integration_bots_avatars.py --check-missing
# Not running documentation tests since it takes 20s and only tests documentation
# run ./tools/test-documentation
run ./tools/test-help-documentation $FORCEARG
run ./tools/test-api
# Not running requirements check locally, because slow and low-churn
# run ./tools/test-locked-requirements
# 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
# ci/frontend
run ./tools/lint --groups=frontend $FORCEARG
run ./tools/test-js-with-node
run ./tools/check-node-fixtures
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
run ./tools/test-js-with-puppeteer $FORCEARG
printf '\n\e[32mAll OK!\e[0m\n'