From 91c56ed9a1f87cb088cdeb22622ad1887e955dbc Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Thu, 11 Jul 2019 15:16:41 +0200 Subject: [PATCH] Add local bindep.txt and py36-func-mysql job As it was announced [1] global bindep-fallback.txt was removed and now projects need to have a local bindep.txt to be able to install binary dependencies for testing. In test jobs the script tools/test-setup.sh is called which requires mysql and postgres servers and clients to be installed. To eliminate 'ERROR: InterpreterNotFound: python3.5' of the zuul job refstack-tox-py35-func-mysql, simply replace the tox environment py35-func-mysql to py36-func-mysql with a base python of 3.6 instead of 3.5 and rename the zuul job to contain py36 in the name. Update the Zuul template to use nodejs6 jobs, this makes the single jobs obsolete, remove them. Without this change, the gate will use nodejs4 and fail. [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html Change-Id: I90cb912befb9d09fed330bd8d27a491caffbf7b9 --- .zuul.yaml | 22 +++++++--------------- bindep.txt | 8 ++++++++ tox.ini | 18 +++++++++++++++--- 3 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 bindep.txt diff --git a/.zuul.yaml b/.zuul.yaml index a0cc031e..dadf8f6f 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,6 +1,6 @@ - project: templates: - - nodejs4-jobs + - nodejs6-jobs - publish-openstack-docs-pti - openstack-cover-jobs - openstack-python-jobs @@ -9,19 +9,11 @@ check: jobs: - refstack-tox-py27-func-mysql - - refstack-tox-py35-func-mysql - - nodejs-npm-run-lint: - vars: - node_version: 6 - voting: false - - nodejs-npm-run-test: - vars: - node_version: 6 - voting: false + - refstack-tox-py36-func-mysql gate: jobs: - refstack-tox-py27-func-mysql - - refstack-tox-py35-func-mysql + - refstack-tox-py36-func-mysql - job: name: refstack-tox-py27-func-mysql @@ -38,15 +30,15 @@ tox_envlist: py27-func-mysql - job: - name: refstack-tox-py35-func-mysql + name: refstack-tox-py36-func-mysql parent: openstack-tox description: | - Run unit tests for an OpenStack Python project under cPython version 3.5. + Run unit tests for an OpenStack Python project under cPython version 3.6. - Uses tox with the ``py35-func-mysql`` environment. + Uses tox with the ``py36-func-mysql`` environment. irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - ^releasenotes/.*$ vars: - tox_envlist: py35-func-mysql + tox_envlist: py36-func-mysql diff --git a/bindep.txt b/bindep.txt new file mode 100644 index 00000000..cba81a40 --- /dev/null +++ b/bindep.txt @@ -0,0 +1,8 @@ +# This is a cross-platform list tracking distribution packages needed for install and tests; +# see https://docs.openstack.org/infra/bindep/ for additional information. + +mysql-client [platform:dpkg] +mysql-server [platform:dpkg] +postgresql +postgresql-client [platform:dpkg] + diff --git a/tox.ini b/tox.ini index 62b10da4..cc1143c3 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ # py3* tests should be run before py27 # it is a workaround for testr bug # https://bugs.launchpad.net/testrepository/+bug/1229445 -envlist = py35,py27,pep8,pip-check-reqs +envlist = py35,py36,py27,pep8,pip-check-reqs minversion = 1.6 skipsdist = True @@ -28,8 +28,8 @@ setenv = SUBUNIT_TEST_PATH=./refstack/tests/api # require cleanup of database commands = {toxinidir}/setup-mysql-tests.sh python setup.py testr --slowest --testr-args='{posargs:--concurrency=1}' -[testenv:py35-func-mysql] -basepython = python3.5 +[testenv:py36-func-mysql] +basepython = python3.6 setenv = SUBUNIT_TEST_PATH=./refstack/tests/api # Integration/functional tests # must not be run in parallel (--concurrency=1), @@ -93,3 +93,15 @@ commands = oslo_debug_helper -t refstack/tests/unit {posargs} [testenv:debug35] basepython = python3.5 commands = oslo_debug_helper -t refstack/tests/unit {posargs} + +[testenv:bindep] +basepython = python3 +# Do not install any requirements. We want this to be fast and work even if +# system dependencies are missing, since it's used to tell you what system +# dependencies are missing! This also means that bindep must be installed +# separately, outside of the requirements files, and develop mode disabled +# explicitly to avoid unnecessarily installing the checked-out repo too (this +# further relies on "tox.skipsdist = True" above). +deps = bindep +commands = bindep test +usedevelop = False