Skip to content

Commit

Permalink
Merge pull request #29 from SIPp/fix_ci
Browse files Browse the repository at this point in the history
Fix ci
  • Loading branch information
goodboy authored Jul 20, 2017
2 parents 52bcb73 + 8528efb commit b989a31
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 19 deletions.
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
language: python
sudo: false
dist: trusty
dist: precise

cache:
- bundler
- pip

python:
- 2.7
- 3.4
- 3.5
- 3.6
- nightly
- pypy
- pypy3
# - pypy3

addons:
apt:
Expand All @@ -31,11 +31,9 @@ install:
before_script:
- git clone https://github.com/SIPp/sipp.git
- cd sipp
- autoreconf -vifs
- ./configure --with-gsl --with-openssl --with-pcap --with-rtpstream --with-sctp
- make -j2
- ./build.sh
- export PATH="$PWD:$PATH"
- cd ..

script:
- python setup.py pytest
- pytest tests/
2 changes: 1 addition & 1 deletion pysipp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def finalize(cmds2procs=None, timeout=180, raise_exc=True):
and perform error and logfile reporting.
"""
cmds2procs = cmds2procs or runner.get(timeout=timeout)
agents2procs = zip(agents, cmds2procs.values())
agents2procs = list(zip(agents, cmds2procs.values()))
msg = report.err_summary(agents2procs)
if msg:
# report logs and stderr
Expand Down
6 changes: 4 additions & 2 deletions pysipp/netplug.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ def pysipp_conf_scen(agents, scen):
for ua in scen.agents.values():
copy = scen.prepare_agent(ua)

ip, port = getsockaddr(ua.local_host)

if not copy.local_host:
ua.local_host = host
ua.local_host = ip

if not copy.local_port:
ua.local_port = getsockaddr(ua.local_host)[1]
ua.local_port = port

if not copy.media_addr:
ua.media_addr = ua.local_host
Expand Down
6 changes: 0 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Authors : Tyler Goodlet

import sys
from setuptools import setup


needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
with open('README.md') as f:
readme = f.read()

Expand All @@ -40,10 +37,7 @@
platforms=['linux'],
packages=['pysipp'],
install_requires=['pluggy==0.3.1'],
setup_requires=['pytest-runner'] if needs_pytest else [],
tests_require=['pytest'],
# use_2to3 = False
# zip_safe=True,
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_dict_field():

def test_list_field():
cmd = SippCmd()
assert not isinstance(cmd.info_files, basestring)
assert cmd.info_files is None

# one entry
cmd.info_files = ["100"]
Expand Down
7 changes: 5 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
# and then run "tox" from this directory.

[tox]
envlist = py27, py34, py35, py36, pypy
envlist = py27, py35, py36, pypy

[testenv]
deps =
pytest
pdbpp
commands =
{envpython} setup.py pytest
pytest tests/ {posargs}

0 comments on commit b989a31

Please sign in to comment.