Skip to content

Commit

Permalink
configure automated tests with tox and travis
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert committed Jun 28, 2015
1 parent 3815a70 commit ac2cc88
Show file tree
Hide file tree
Showing 7 changed files with 137 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .gitignore
@@ -1,3 +1,62 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

*.py[co]
build/
*.egg-info
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "gevent"]
path = gevent
url = https://github.com/gevent/gevent.git
13 changes: 13 additions & 0 deletions .travis.yml
@@ -0,0 +1,13 @@
language: python
python: 3.4
env:
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=lint
install:
- pip install tox
script:
- tox -e $TOX_ENV
cache:
directories:
- .tox
1 change: 1 addition & 0 deletions gevent
Submodule gevent added at 454bce
27 changes: 27 additions & 0 deletions known_failures.patch
@@ -0,0 +1,27 @@
--- known_failures.py 2015-06-28 14:33:12.270911380 +0100
+++ known_failures.py 2015-06-28 14:33:04.303661343 +0100
@@ -107,6 +107,24 @@
FLAKY test__socket.py
'''.strip().split()

+FAILING_TESTS += '''
+ test__subprocess_poll.py
+ test_close_backend_fd.py
+ test_hub_join_timeout.py
+ test__example_udp_client.py
+ test_hub_join.py
+ test__subprocess.py
+ test_threading_2.py
+ test__destroy.py
+ test__server.py
+ test__doctests.py
+ test__core_stat.py
+ test__example_portforwarder.py
+ test__example_udp_server.py
+ test__environ.py
+ test_ares_timeout.py
+'''.strip().split()
+

if __name__ == '__main__':
import pprint
14 changes: 14 additions & 0 deletions runtests.sh
@@ -0,0 +1,14 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'

TOXINIDIR=$1
ENVTMPDIR=$2

mkdir -p "${ENVTMPDIR}"
cp -r "${TOXINIDIR}/gevent" "${ENVTMPDIR}/gevent"
(
cd "${ENVTMPDIR}/gevent"
patch < "${TOXINIDIR}/known_failures.patch"
make fulltoxtest
)
20 changes: 20 additions & 0 deletions tox.ini
@@ -0,0 +1,20 @@
[tox]
envlist = py{33,34}, lint

[testenv]
setenv =
GEVENT_LOOP = tulipcore.Loop
commands = {toxinidir}/runtests.sh {toxinidir} {envtmpdir}
deps =
py33: asyncio==3.4.3
cython==0.22.1
https://github.com/gevent/gevent/archive/454bced7b3a3e4feb0d8c101de290aacd36dac2d.tar.gz

[testenv:lint]
deps =
flake8==2.4.1
cython==0.22.1
https://github.com/gevent/gevent/archive/454bced7b3a3e4feb0d8c101de290aacd36dac2d.tar.gz
commands=
flake8 tulipcore.py
whitelist_externals=cp

0 comments on commit ac2cc88

Please sign in to comment.