From 7eb1ccb1d6277c27c2407fbe91f676ba1d67c88c Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 18 Apr 2014 12:35:30 +0300 Subject: [PATCH 1/5] Run tests in different jobs: http://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-your-builds-across-virtual-machines --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34ffcfe1a..24eb977a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,7 @@ script: - coverage erase - python setup.py clean - python setup.py build_ext --inplace - - coverage run --append --include=PIL/* selftest.py - - python Tests/run.py --coverage + - $TEST_CMD after_success: - coverage report @@ -39,6 +38,10 @@ after_success: - pep8 PIL/*.py - pyflakes PIL/*.py +env: + - TEST_CMD=coverage run --append --include=PIL/* selftest.py + - TEST_CMD=python Tests/run.py --coverage + matrix: allow_failures: - python: "pypy" From 1fc4be3effce3312db2ff2cf594136345f2305a4 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 18 Apr 2014 12:46:09 +0300 Subject: [PATCH 2/5] Add quotes around commands so second one doesn't hit the Python prompt and sit there forever --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24eb977a8..3af69464f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,8 +39,8 @@ after_success: - pyflakes PIL/*.py env: - - TEST_CMD=coverage run --append --include=PIL/* selftest.py - - TEST_CMD=python Tests/run.py --coverage + - TEST_CMD="coverage run --append --include=PIL/* selftest.py" + - TEST_CMD="python Tests/run.py --coverage" matrix: allow_failures: From bdd610af9a0349bd69bd83974179b81eea0e535e Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 18 Apr 2014 12:58:24 +0300 Subject: [PATCH 3/5] Remove parallel tests to benchmark serial times --- .travis.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3af69464f..34ffcfe1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,8 @@ script: - coverage erase - python setup.py clean - python setup.py build_ext --inplace - - $TEST_CMD + - coverage run --append --include=PIL/* selftest.py + - python Tests/run.py --coverage after_success: - coverage report @@ -38,10 +39,6 @@ after_success: - pep8 PIL/*.py - pyflakes PIL/*.py -env: - - TEST_CMD="coverage run --append --include=PIL/* selftest.py" - - TEST_CMD="python Tests/run.py --coverage" - matrix: allow_failures: - python: "pypy" From e0989286b2c4425a1cea2b025527755711a931ac Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 18 Apr 2014 12:59:22 +0300 Subject: [PATCH 4/5] Add back parallel test jobs to benchmark again --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 34ffcfe1a..3af69464f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,7 @@ script: - coverage erase - python setup.py clean - python setup.py build_ext --inplace - - coverage run --append --include=PIL/* selftest.py - - python Tests/run.py --coverage + - $TEST_CMD after_success: - coverage report @@ -39,6 +38,10 @@ after_success: - pep8 PIL/*.py - pyflakes PIL/*.py +env: + - TEST_CMD="coverage run --append --include=PIL/* selftest.py" + - TEST_CMD="python Tests/run.py --coverage" + matrix: allow_failures: - python: "pypy" From cf3050140f5c5284852bebf7701d0a208153b910 Mon Sep 17 00:00:00 2001 From: hugovk Date: Fri, 18 Apr 2014 13:02:45 +0300 Subject: [PATCH 5/5] pypy tests are 2-3x slower than py2/3 so run them first so we're not sitting at the end waiting for the final job to finish. Makes better use of the parallel job-runners. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3af69464f..24cd5069b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,11 +8,11 @@ notifications: irc: "chat.freenode.net#pil" python: + - "pypy" - 2.6 - 2.7 - 3.2 - 3.3 - - "pypy" install: - "sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-qt4 ghostscript libffi-dev cmake"