From 45f97de657418504567474860decf7b40914cb4d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Mar 2019 17:15:46 +0000 Subject: [PATCH 1/7] Add py27-old test case to buildkite --- .buildkite/pipeline.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 369a1ffed1..44b258dca6 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -90,6 +90,17 @@ steps: image: "python:3.7" propagate-environment: true + - command: + - "python -m pip install tox" + - "tox -e py27-old,codecov" + label: ":python: 2.7 / SQLite / Old Deps" + env: + TRIAL_FLAGS: "-j 2" + plugins: + - docker#v3.0.1: + image: "python:2.7" + propagate-environment: true + - label: ":python: 2.7 / :postgres: 9.4" env: TRIAL_FLAGS: "-j 4" From 9ef1107b334e1e0d5f44154a8291b04b54772949 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Mar 2019 17:19:49 +0000 Subject: [PATCH 2/7] Newsfile --- changelog.d/4879.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/4879.misc diff --git a/changelog.d/4879.misc b/changelog.d/4879.misc new file mode 100644 index 0000000000..5b5109cb49 --- /dev/null +++ b/changelog.d/4879.misc @@ -0,0 +1 @@ +Readd test case that runs unit tests against oldest supported dependencies. From b6ac5e40a0a3265f3a93bb28663398a1b55bed1e Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Mar 2019 17:31:46 +0000 Subject: [PATCH 3/7] Add coverage to py27-old --- tox.ini | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tox.ini b/tox.ini index 19080a648f..4400041778 100644 --- a/tox.ini +++ b/tox.ini @@ -82,15 +82,18 @@ deps = mock lxml + coverage commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete # Make all greater-thans equals so we test the oldest version of our direct # dependencies, but make the pyopenssl 17.0, which can work against an # OpenSSL 1.1 compiled cryptography (as older ones don't compile on Travis). /bin/sh -c 'python -m synapse.python_dependencies | sed -e "s/>=/==/g" -e "s/psycopg2==2.6//" -e "s/pyopenssl==16.0.0/pyopenssl==17.0.0/" | xargs pip install' - # Install Synapse itself. This won't update any libraries. - pip install -e . - {envbindir}/trial {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} + + # Add this so that coverage will run on subprocesses + /bin/sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py' + + {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} [testenv:packaging] skip_install=True From 00d97668bf4a20a0409344c5cd9e50a36603ef83 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Mar 2019 17:45:45 +0000 Subject: [PATCH 4/7] Bring py27-old into line with other test envs --- tox.ini | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tox.ini b/tox.ini index 4400041778..a2dd35f197 100644 --- a/tox.ini +++ b/tox.ini @@ -83,6 +83,17 @@ deps = mock lxml coverage + +extras = all + +whitelist_externals = + sh + +setenv = + {[base]setenv} + +passenv = * + commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete # Make all greater-thans equals so we test the oldest version of our direct @@ -95,6 +106,9 @@ commands = {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} +usedevelop=true + + [testenv:packaging] skip_install=True deps = From 4d25624ff66e909a288230b417fb525065c00e96 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 19 Mar 2019 10:28:00 +0000 Subject: [PATCH 5/7] Revert changes --- tox.ini | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tox.ini b/tox.ini index a2dd35f197..0c2ba060b1 100644 --- a/tox.ini +++ b/tox.ini @@ -84,16 +84,6 @@ deps = lxml coverage -extras = all - -whitelist_externals = - sh - -setenv = - {[base]setenv} - -passenv = * - commands = /usr/bin/find "{toxinidir}" -name '*.pyc' -delete # Make all greater-thans equals so we test the oldest version of our direct @@ -104,9 +94,9 @@ commands = # Add this so that coverage will run on subprocesses /bin/sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py' - {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} + pip install -e . -usedevelop=true + {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:} [testenv:packaging] From cfc5a442accfab63d9cde7cc6af4da4d046f81b3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 19 Mar 2019 10:56:11 +0000 Subject: [PATCH 6/7] Update newsfile --- changelog.d/4879.misc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/4879.misc b/changelog.d/4879.misc index 5b5109cb49..574017230c 100644 --- a/changelog.d/4879.misc +++ b/changelog.d/4879.misc @@ -1 +1 @@ -Readd test case that runs unit tests against oldest supported dependencies. +Reinstate test case that runs unit tests against oldest supported dependencies. From b0e767f7bbed90e07740aaeaa2aa747f6bb47401 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 19 Mar 2019 12:51:32 +0000 Subject: [PATCH 7/7] Add comment back in --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 0c2ba060b1..ef543890f9 100644 --- a/tox.ini +++ b/tox.ini @@ -94,6 +94,7 @@ commands = # Add this so that coverage will run on subprocesses /bin/sh -c 'echo "import coverage; coverage.process_startup()" > {envsitepackagesdir}/../sitecustomize.py' + # Install Synapse itself. This won't update any libraries. pip install -e . {envbindir}/coverage run "{envbindir}/trial" {env:TRIAL_FLAGS:} {posargs:tests} {env:TOXSUFFIX:}