Commit Graph

59 Commits

Author SHA1 Message Date
Eklavya Sharma d745f20b1b Run frontend and backend tests in python3 on Travis. 2016-07-19 14:15:35 -07:00
Eklavya Sharma e86539649c Use tools/travis/activate-venv in test suites. 2016-07-19 14:15:35 -07:00
Eklavya Sharma bc901ac6d8 tools/travis/py3-backend: Add tools/test-management. 2016-07-18 09:57:28 -07:00
Tim Abbott 4972154df9 setup-production: Improve debugging of build-release-tarball errors. 2016-07-12 19:09:28 -07:00
Eklavya Sharma 934a0f7c6c Add tools/test-backend to py3-backend test suite. 2016-07-12 09:27:55 -07:00
Eklavya Sharma 158d67e702 Run tools/test-migrations in Travis. 2016-07-11 21:30:32 -07:00
Eklavya Sharma 57ce3f4af1 tools/travis/lint-all: Factor out error message. 2016-07-11 21:30:32 -07:00
Eklavya Sharma 08a4555e0f Merge mypy and py3k test suites in Travis. 2016-07-11 21:28:01 -07:00
Eklavya Sharma aa68fd1679 Run tools/lint-all on Travis in python 3. 2016-07-08 10:43:48 -07:00
Eklavya Sharma 5e8dba4c75 Add mypy in python 3 mode to travis.
This helps catch Python 3 compatibility issues.
2016-07-07 09:44:00 -07:00
Tim Abbott 7ed0ab8c4a Ensure Zulip virtualenvs are world-readable.
This is important for both ensuring the Nagios checks work correctly
in production, as well as making sure the `zulip` user can access the
virtualenv (owned by the `travis` user) in Travis CI.
2016-06-28 12:03:01 -07:00
Tim Abbott beb8b50623 Move provision.py under tools/. 2016-06-27 19:04:32 -07:00
rahuldeve 3ca53df152 Add test for worker queue autoreloading. 2016-06-26 20:12:37 -07:00
Tim Abbott 039c175d68 production-helper: Hold tons of packages.
This saves almost a minute doing apt upgrades in the production test
suite.
2016-06-22 10:41:09 -07:00
Tim Abbott 9b436c7190 setup-production: Remove more irrelevant postgres packages. 2016-06-22 10:41:09 -07:00
Tim Abbott 5a109cf816 travis: Skip development database setup in production tests.
This saves about 20s on the runtime of the production build.
2016-06-22 10:41:09 -07:00
Tim Abbott 0f2729f5fb production-helper: use dist-upgrade to match install script.
Previously, we were wasting time every time we installed packages,
because `apt-get upgrade` would only install most of the packages
`apt-get dist-upgrade` would.
2016-06-22 10:38:27 -07:00
Tim Abbott 3899b4c913 Move py3k requirements to requirements/py3k.txt. 2016-06-18 16:41:40 -07:00
Tim Abbott 5c92639f81 Move mypy requirements to requirements/ directory. 2016-06-18 16:41:40 -07:00
Tim Abbott 39a8c82957 travis: Remove verbose coverage report from end of build output. 2016-06-15 15:05:38 -07:00
Tim Abbott 062287d0b0 Coveralls: Add coverage reporting to backend test suite. 2016-06-10 17:20:00 -07:00
Umair Khan 938291a922 Add run-dev.py test to Travis CI test suites.
Fixes #919
2016-06-08 14:10:37 +05:00
Reid Barton 0b7852f081 Generate mypy coverage report for travis + coveralls. 2016-06-04 13:01:19 -07:00
Umair Khan 0278ce9102 Move tools/py3_test_reqs.txt to tools/setup/.
Fixes #708
2016-05-26 18:43:24 +05:00
Eklavya Sharma f3e25c68c7 Prevent tools/travis/mypy from failing silently.
Also improve the format of tools/travis/mypy's output.
Also add those files to the exclude list which are failing mypy check.
2016-05-21 12:37:04 +05:30
Tim Abbott 6c744564a7 travis: Add debugging code for rabbitmq nagios failures. 2016-05-09 09:55:18 -07:00
Tim Abbott 804dad42e6 travis: Run various Nagios checks in production tests. 2016-05-08 17:35:50 -07:00
Tim Abbott 744e8ad0e3 travis: Set prod EXTERNAL_HOST to resolve correctly.
This is needed to use check_send_receive_time in the tests.
2016-05-08 17:35:50 -07:00
Tim Abbott e4c098fba4 travis: Verify all supervisord jobs are running in production test.
This requires a bit of complexity since supervisord automatically
restarts failing jobs.
2016-05-08 17:35:50 -07:00
Tim Abbott 40de75d9e6 travis: Verify the server doesn't 500 in production test. 2016-05-08 17:35:50 -07:00
Tim Abbott 3a0e7c217f mypy: Move verbose error output to travis CI wrapper.
This makes it easier to pipe the output of tools/run-mypy to tools
like grep.
2016-05-06 13:38:12 -07:00
Tim Abbott 52c1e8ac7d Run a local camo server in voyager production environments.
Camo is a caching image proxy, used in Zulip to avoid mixed-content
warnings by proxying HTTP image content over HTTPS.  We've been using
it in zulip.com production for years; this change makes it available
in standalone Zulip deployments.
2016-05-02 17:21:31 -07:00
Tim Abbott 48a578d003 travis: hold expensive to upgrade packages in Travis CI.
This should save a few minutes of time running the production test
suite.  This is part of solving #722.
2016-05-02 16:59:21 -07:00
Tim Abbott 79327a61ae travis: Do an apt-get update before the apt upgrade.
This should save several minutes off the Travis CI `production`
suite's runtime, since previously we were doing the full apt upgrade
process twice, resulting in things like multiple expensive rebuilds of
the initramfs.
2016-05-02 16:35:46 -07:00
Eklavya Sharma 247cdf578b Add dependencies to setup-py3k.
Add 'six' to setup-py3k, because it is being used in tools/lister.py.
Add 'typing' to setup-py3k, so that tools/lister.py can be type
annotated in the future.
2016-05-01 10:47:04 +05:30
Eklavya Sharma 1041115b38 Add code to install mypy from provision.py. 2016-04-28 12:28:24 -07:00
Eklavya Sharma c80f699321 Add tools/run-mypy to Travis checks.
Fixes #635.
2016-04-28 10:03:35 -07:00
Eklavya Sharma cbba7202e6 Add future and modernize to requirements.txt
Also improve tools/travis/setup-py3k in these ways:
* remove sudo
* add --no-deps to pip install
* specify versions in pip install
2016-04-25 09:50:32 -07:00
Eklavya Sharma b4009c28d0 Move py3k and add a travis wrapper for it.
Move tools/travis/py3k to tools/check-py3.
Add tools/travis/py3k which calls tools/check-py3.
2016-04-25 09:50:32 -07:00
Tim Abbott 52fc1c71bc provision: Rewrite using subprocess module instead of sh.
The `with sh.sudo` pattern that we were using in python-sh was
deprecated, and emperically hangs on Ubuntu xenial.  Since in general
the use of python-sh/python-pbs caused trouble (requiring extra
dependencies, confusing syntax), this just removes it.

We replace it with a new zulip_tools.py library function that echoes
the command line and streams the output.

We do the same to install-phantomjs so we can remove that dependency.
2016-04-10 17:33:19 -07:00
Eklavya Sharma 05ab57e373 In py3k, exit with 1 if repository is not clean. 2016-04-05 13:22:51 -07:00
Eklavya Sharma 569d1240d0 Exit with 1 in py3k when fixers find an issue.
tools/travis/py3k used to always exit with exit code 0.
It should exit with 1 when fixers detect a compatibility issue.

py3k used [ -z "$failed" ] to check if there was a failure.
This is wrong, since if no failure has occured, failed=0,
and -z checks if a string is of zero length. This commit also
fixes this bug.
2016-04-05 13:22:51 -07:00
Eklavya Sharma dd501830a6 Change position where git reset is called in py3k.
In py3k, "git reset --hard" was called only if
libmodernize.fixes.fix_dict_six changed files and some of those
changes are not considered false positives by py3k.
But if all of those changes are not considered false positives
by py3k, then "git reset --hard" is not called and the repository
is no longer clean.

This commit fixes this bug.
2016-04-05 13:22:51 -07:00
Eklavya Sharma 5e71777975 Add --no-pager option to git diff in py3k.
This is needed because py3k hangs when a pager opens up.
2016-04-05 13:22:51 -07:00
Eklavya Sharma adff674b0e tools/travis/py3k now checks all python files.
tools/travis/py3k used to only check files whose names ended with .py.
Now it also checks python scripts which don't have an extension.
It uses tools/lister.py to get a list of all python files.
2016-04-05 13:22:51 -07:00
Tim Abbott 206dc3aafc Add python 3 compatibility check for libmodernize.fixes.fix_dict_six.
It's not clear whether this will end up being net negative in value in
the long term since it's kinda hard to understand the output, but in
the short term it should prevent regressions.
2016-01-26 21:11:25 -08:00
Tim Abbott 757e89260e Migrate use of StringIO to Python 2+3 compatible six.moves.cStringIO.
And add a check for additional usage of the original StringIO module.
2016-01-26 21:09:43 -08:00
Tim Abbott 1f44417fc1 Switch to using Python 3 style division everywhere.
Also add testing for this to our Python 3 compatibility test suite.
2016-01-26 21:09:43 -08:00
Tim Abbott 6528b18ad3 Switch all urllib/urlparse usage to six.moves.urllib.
This provides Python 2+3 compatibility for our use of urllib.

Also add a test to avoid future regressions.
2016-01-26 21:09:43 -08:00
Tim Abbott 700055c194 Apply modernize transform libmodernize.fixes.fix_file.
This replaces use of file() with open() which is python 3 compatible,
and also adds it to our python 3 support test suite.
2016-01-26 21:09:42 -08:00