Skip to content

Commit

Permalink
Set up ports for python environments
Browse files Browse the repository at this point in the history
Allow concurrent jenkins builds to run on different python
versions.

Change-Id: I518a00156c632abca41092fb837ebada5f51effa
  • Loading branch information
zzzeek committed May 27, 2016
1 parent 97add35 commit 94c4daf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions hash_port.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import os
import sys

start, end = int(sys.argv[1]), int(sys.argv[2])

dir_ = os.getcwd()

print (hash(dir_) % (end - start)) + start

5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ setenv=

{generic}: RUNTESTS=-k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'

{memcached}: PIFPAF=pifpaf --env-prefix DOGPILE run memcached --
{memcached}: PIFPAF=pifpaf --env-prefix DOGPILE run memcached --port {env:TOX_DOGPILE_PORT:11234} --
{memcached}: RUNTESTS=tests/cache/test_memcached_backend.py

{redis}: PIFPAF=pifpaf --env-prefix DOGPILE run redis --
{redis}: PIFPAF=pifpaf --env-prefix DOGPILE run redis --port {env:TOX_DOGPILE_PORT:11234} --
{redis}: RUNTESTS=tests/cache/test_redis_backend.py

{dbm}: RUNTESTS=tests/cache/test_dbm_backend.py

{cov}: COVERAGE={[testenv]cov_args}


deps=
pytest
mock
Expand Down

0 comments on commit 94c4daf

Please sign in to comment.