8000 travis: Use docker to test 32bit environment (#189) · donalm/msgpack-python@63e23d3 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 63e23d3

Browse files
committed
travis: Use docker to test 32bit environment (msgpack#189)
* travis: testing matrix.include feature to use docker * Add test script for 32bit * Fix OverflowError in 32bit Environment
1 parent fc29338 commit 63e23d3

File tree

3 files changed

+43
-13
lines changed

3 files changed

+43
-13
lines changed

.travis.yml

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
sudo: false
2+
language: python
3+
python: 3.5
24
cache:
35
directories:
46
- $HOME/.cache/pip
5-
language: python
6-
python:
7-
- 3.5
87

98
branches:
10-
only:
11-
- master
9+
only:
10+
- master
1211

1312
env:
14-
- TOXENV=py27-c,py33-c,py34-c,py35-c
15-
- TOXENV=py27-pure,py33-pure,py34-pure,py35-pure
16-
- TOXENV=pypy-pure,pypy3-pure
13+
- TOXENV=py27-c,py33-c,py34-c,py35-c
14+
- TOXENV=py27-pure,py33-pure,py34-pure,py35-pure
15+
- TOXENV=pypy-pure,pypy3-pure
16+
17+
matrix:
18+
include:
19+
- sudo: required
20+
services:
21+
- docker
22+
env:
23+
- DOCKER_IMAGE=quay.io/pypa/manylinux1_i686
24+
install:
25+
- pip install -U pip
26+
- pip install cython
27+
- cython --cplus msgpack/_packer.pyx msgpack/_unpacker.pyx
28+
- docker pull $DOCKER_IMAGE
29+
script:
30+
- docker run --rm -v `pwd`:/io -w /io $DOCKER_IMAGE /io/docker/runtests.sh
1731

1832
install:
19-
- pip install -U pip
20-
- pip install tox cython
21-
- cython --cplus msgpack/_packer.pyx msgpack/_unpacker.pyx
33+
- pip install -U pip
34+
- pip install tox cython
35+
- cython --cplus msgpack/_packer.pyx msgpack/_unpacker.pyx
2236

2337
script: tox
38+
39+
# vim: sw=2 ts=2

docker/runtests.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
set -e -x
3+
4+
for V in cp35-cp35m cp34-cp34m cp27-cp27m cp27-cp27mu; do
5+
PYBIN=/opt/python/$V/bin
6+
$PYBIN/python setup.py install
7+
rm -rf build/ # Avoid lib build by narrow Python is used by wide python
8+
$PYBIN/pip install pytest
9+
pushd test # prevent importing msgpack package in current directory.
10+
$PYBIN/python -c 'import sys; print(hex(sys.maxsize))'
11+
$PYBIN/python -c 'from msgpack import _packer, _unpacker'
12+
$PYBIN/py.test -v
13+
popd
14+
done

msgpack/_packer.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ cdef class Packer(object):
272272
msgpack_pack_ext(&self.pk, typecode, len(data))
273273
msgpack_pack_raw_body(&self.pk, data, len(data))
274274

275-
def pack_array_header(self, size_t size):
275+
def pack_array_header(self, long long size):
276276
if size > ITEM_LIMIT:
277277
raise PackValueError
278278
cdef int ret = msgpack_pack_array(&self.pk, size)
@@ -285,7 +285,7 @@ cdef class Packer(object):
285285
self.pk.length = 0
286286
return buf
287287

288-
def pack_map_header(self, size_t size):
288+
def pack_map_header(self, long long size):
289289
if size > ITEM_LIMIT:
290290
raise PackValueError
291291
cdef int ret = msgpack_pack_map(&self.pk, size)

0 commit comments

Comments
 (0)
0