diff --git a/tools/test-all b/tools/test-all index ee4ddbf3b6..f2afc7ae3a 100755 --- a/tools/test-all +++ b/tools/test-all @@ -18,5 +18,7 @@ run ./tools/lint-all run ./tools/test-js-with-node run ./tools/test-backend run ./tools/test-js-with-casper +# Not running management test since it takes 40s and thus is too slow to be worth it. +# run ./tools/test-management printf '\n\e[32mAll OK!\e[0m\n' diff --git a/tools/test-management b/tools/test-management new file mode 100755 index 0000000000..5451bea2fa --- /dev/null +++ b/tools/test-management @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Testing management commands start!" +failed=0 +for i in `ls */management/commands/ | grep .py$ | grep -v __init__ | sed 's/[.]py$//'`; do + if ! $(./manage.py $i --help >/dev/null); then + failed=$(expr $failed + 1) + echo "ERROR: \`./manage.py $i --help\` crashes!"; + fi +done + +if [ $failed -gt 0 ]; then + echo + echo "$failed management commands don't start!" + exit 1 +fi +echo "All management commands start!" diff --git a/tools/travis/backend b/tools/travis/backend index e1b3d206f9..a608c2f87e 100755 --- a/tools/travis/backend +++ b/tools/travis/backend @@ -5,3 +5,4 @@ source /srv/zulip-venv/bin/activate export PATH=$PATH:/srv/zulip-venv/bin ./tools/lint-all ./tools/test-backend +./tools/test-management