Commit Graph

41 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 310b799873 Update tox.ini to work with 4.0
With tox release of 4.0, some parameters were deprecated and are ignored now
which causes tox failures. One of the most spread issues we have is using
`whitelist_externals` isntead of `allowlist_externals`


Change-Id: I915e2d54a89b059f9baa21dc3f142e131c33f600
2022-12-27 17:53:10 +01:00
Jonathan Rosser 0835aa063e Cleanup setup.py config
Change-Id: I378993e01ebc354748f4f5cb48e70d9dfa658d3a
2022-04-04 09:55:53 +00:00
zhoulinhui 479d188c29 Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: Ie74f009f2ef0c56acc49704902095789fb24445a
2020-11-10 13:11:24 +08:00
Andreas Jaeger 69d094b29f Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Cleanup doc/source/conf.py to remove now obsolete content.

Change-Id: If6065686dd9250085a7582509becd92602cb1169
2020-04-13 18:37:23 +02:00
Ghanshyam Mann 99ad2fbf9c [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

Only update required is in tox to define common baspython as py3 os that
all tox env including [testenv:functional] will use py3 instead of py2.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: Ia7217ae8229a893708dd33e03c1eae35c30f6616
2020-03-01 16:06:37 +00:00
jacky06 69e3589db2 tox: Keeping going with docs
1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Depends-On: Ie837d376bb1a1d93367369d25140dd8a9d5ac14e
Change-Id: I6ee3ff95f2fd2c228ea1d8694ccd2423dc33c21a
2019-10-23 17:42:19 +00:00
liuwei c469744a99 update git.openstack.org to opendev
Change-Id: Icb09d117937d20b453e9a642471440b89fe9cde3
2019-09-27 01:05:47 +00:00
huang.zhiping 62e4884853 fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I923a943291f7b0882b5ffe169a3d287747f0055e
Closes-Bug:  #1801657
2018-12-24 07:48:28 +00:00
Doug Hellmann e2bd7d7ebc fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: Ied02ba5f2bae333f7b501f47729938875ff33f7e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:41:55 -04:00
Zuul a6c2c8251d Merge "fix tox python3 overrides" 2018-08-23 03:25:46 +00:00
Jesse Pretorius 962d3c011f Use the TESTING_BRANCH env var for constraints
The TESTING_BRANCH environment variable is provided by the
run_tests.sh script and is derived from the .gitreview file.

This ensures that once the master branch becomes a stable
branch, the constraints from the stable branch in the
integrated repository will automatically get used once the
.gitreview file is updated.

To ensure that the required environment variables are present
we export them appropriately in run_tests.sh and modify the
tox configuration to pass them into the tox test.

Change-Id: I4120baba6152313c5493ab538627d0ea2c222734
Needed-By: https://review.openstack.org/579371
2018-08-16 15:21:41 +01:00
melissaml 6849364a3b fix tox python3 overrides
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.

We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.

We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.

Change-Id: I0c5db9da56a0620c049b0dcdf2c0410762fd7114
2018-07-23 19:00:40 +08:00
Heba Naser 355840bd82 Use tests repo for common role test requirements
Using tox for requirements management requires in-repo
requirements files for all our repositories. Rather than
do that, we make use of the tests repo to capture our
common requirements and use this to install them.

This reduces our review requirement rate and simplifies
maintenance for us for the tox config. It also makes it
usable with 'Depends-On', which is marvellous!

The tox requirements definitions for docs/releasenotes
builds are left in-place as those are standard entries
across the community. If that changes at some point, we
can re-assess those entries too.

Depends-On: https://review.openstack.org/579208
Change-Id: I9b06de06a915609ee607b0d1051cc365f26651b4
2018-07-01 16:36:23 -04:00
Jesse Pretorius b9de2393c2 Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: Ib5851b787c197f7cc64dce076d151026a6f36098
2018-03-28 10:10:46 +01:00
Jesse Pretorius 4fea6d122c tox.ini: Expose USER environment variable to execution environment
In order to allow the use of the environment variable which informs
Ansible which user executed the playbook, we pass the USER env var
into the environment that tox builds.

Change-Id: Ia90ec0618d82088ed582ec81ec07a7c2b5458528
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:55:25 +00:00
ZhongShengping fcc185e5b4 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I0cabc5f58609541becc021fa327c5982221ab519
2018-03-09 12:20:42 +08:00
Jesse Pretorius 493c35b898 Ensure that role tests pin pip/setuptools/wheel
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.

When a version of these tools changes it often causes
problems for our testing.

This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.

Change-Id: Iec458d788374a325f3e55e1e23e1694e140064e0
2017-06-04 11:17:03 +01:00
Jesse Pretorius 7ac518860a Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: I099882ed52c451025145dd712521e3d06902bff1
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:48:50 +01:00
gecong1973 513a170daf Use https instead of http for git.openstack.org
TrivialFix

Change-Id: Idc3c35e3e14fbbd64215533cba6e1be2417e5435
2017-02-06 11:58:29 +08:00
gecong1973 645a103433 Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
     https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: Ie0624a5815da4e8cfbec16c9c6b9c3ff1566cf5f
2016-12-04 09:55:15 +08:00
Jesse Pretorius 43183dd24e Use upper constraints for all tox targets
With the implementation of https://review.openstack.org/388087 all
tox targets may now use upper constraints.

Change-Id: Iabf6ef5bad58d86e97989c0f245753e027897f61
2016-10-19 07:38:52 +01:00
Jesse Pretorius d1f0f2ec6d Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Depends-On: I5c1f2f0949d6b7ad7bfc4151257b081728ba956f
Change-Id: Id17b4ca37dd45ef75fb8daf0e38bbbf729caa5c7
2016-10-10 16:35:46 +01:00
Jesse Pretorius 1d605eb4e6 Remove install_test_packages variable
With https://review.openstack.org/381479 merged, setting this
variable in tox.ini via an extra var is unnecessary.

Change-Id: Iaaf77209c3034e182344be5fb78c565b62b5d667
2016-10-04 11:37:52 +01:00
Jesse Pretorius b158dadd13 Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: Ic47098e2bdf5cc26d4318e007f1d0376daa14d35
2016-09-27 09:31:12 +00:00
Kevin Carter fbe5ec0f92 Update testing bits for consistency
Change-Id: I561f4c4889e9a7bdc0e9b38096376d86b564c1e3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 09:16:52 +00:00
Jesse Pretorius 1c01428d33 Compress test execution logs
The volume of logs we collect in CI jobs are extensive. This
patch ensures that the logs collected are compressed to reduce
the space taken in CI systems.

PYTHONUNBUFFERED is also set to ensure that the console log
from the CI jobs is recorded in the exact order of execution.

Related-Bug: #1620849
Change-Id: I82a3b0b4fd05dba19bf0f44752f15b95bad647a9
2016-09-09 09:07:18 +00:00
Kevin Carter 2d802898d3 Enable log collection after functional testing
This change enables log collection within the gate so that further analysis
on gate tasks can be performed post build. This is very useful when
debugging problems.

Change-Id: I806914a96916d7c8970cd7cafd935b4f0f38a0be
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:31:38 -05:00
Jesse Pretorius 30b5df0c19 Make all linting tests use upper-constraints
As per [1] all linting tests can now use upper-constraints. This patch
removes all instances of the install_command override relating to lint
testing which were needed to negate the use of upper-constraints.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I109ffe93f2de36a1e6c23308e74534f117cc24cf
2016-08-20 16:03:14 +01:00
Travis Truman f4be29612e Ansible 2.1.1 role testing
Change-Id: I877272980cadfe2c3d8eafb65df65d149e570d01
2016-08-11 15:34:49 -05:00
Travis Truman 7bd0f77946 Adding idempotency testing to the role func test
Roles should ideally be idempotent so we should test
that they are as part of our automated tests.

Change-Id: I80a6e09b69ed77b4bf2b97eb9e8d6dcd3ea37899
2016-08-03 22:23:09 -04:00
Jesse Pretorius adf63d9b9e Ensure that doc linting is included in the linters test
The 'docs' tox target executes the doc8 lint test which may result in
failures when testing documentation builds, but OpenStack-CI does not
execute that tox target.

In order to ensure that we catch all standard documentation syntax
errors and prevent them from merging, this patch includes the docs
target in the 'linters' chain of tests.

Fixes for any failures which result from executing this test are also
included in the patch.

Change-Id: Ic56a210b529a54e424944fdc79a00c9fa256bb56
2016-07-25 14:07:52 +01:00
Jesse Pretorius 759816ea73 Use plugins repo version of the human_log callback plugin
With the implementation of https://review.openstack.org/321331 the
human_log callback plugin is now part of the plugins repo.

This patch removes the retrofitted version in tox in favor of using
the version from the plugins repo instead.

Change-Id: Id9e5ef02ee245fd6259d2387b0f74465c7ad0c7c
2016-07-15 13:59:20 +01:00
Jesse Pretorius 7f10a86843 Implement doc8 checks for docs
In order to prepare for the move of detailed configuration
content from the install guide to the roles, doc8 checks
are being implemented in the roles to ensure that any new
content submitted is properly checked.

Change-Id: Ie67f63f419f5c77f8e421ca381433e9b607d4711
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 11:42:57 +00:00
Jesse Pretorius 08fcc0f076 Update tox configuration
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to improve the
reliability and effectiveness of test execution, this patch implements
some changes to the tox configuration:

- The minimum tox version is increased in order to be able to use
  constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
  venv for the linters checks.
- Any proxy environment variables set on the test host are passed
  into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
  a new venv called 'ansible' and this environment is inherited
  by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
  executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
  so it doesn't.
- The Ansible role download will no longer ignore errors so that any
  problems discovered will result in a failed test.
- The human readable logging callback plugin is implemented for
  functional testing.
- The ansible test requirements are moved into tox.ini to ensure
  compliance for requirements.txt/test-requirements.txt for the
  global-requirements management contract.
- The ~/.ansible directory as a whole is not deleted. Instead only
  the plugins and roles folders are deleted to ensure that zuul's
  Ansible artifacts are left in-place.
- The ansible-lint version is updated to support execution against a
  folder, and the test now executes against the entire role to ensure
  that it captures all applicable files for lint testing.

This is a combined port of the following:
- https://review.openstack.org/323507
- https://review.openstack.org/338193
- https://review.openstack.org/332443
- https://review.openstack.org/338193
- https://review.openstack.org/339493

Change-Id: I9e00ddebe0cdb9526e61e9a2b98cd50e6cee8c95
2016-07-08 12:42:32 +00:00
Jesse Pretorius ba8621da8e Add reno scaffolding for release notes management
Change-Id: I8d1f63fa1e38dc0ddd95649ab07c20d670ad0d1e
2016-04-09 18:18:10 +00:00
Jesse Pretorius 72c3a46884 Update tox config and add bashate E006, E040 exceptions
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.

It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.

The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.

The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]

[1] https://github.com/ansible/ansible/issues/13563

Change-Id: I2ec4e9a3087cdeb9c1846e3707071208ef2d02d4
2016-02-12 11:26:59 +00:00
Jesse Pretorius c5139a76b3 Revise all lint tests and add consolidated 'linters' tox environment
OpenStack-Infra has requested that lint tests be pipelined into the 'linters'
tox target in order to make more efficient use of nodepool resources.

This patch:

- Ensures that a complete set of lints tests is available in individual
  tox targets.
- Adds a 'linters' target which executes all the other lints tests.

Change-Id: If0564860ed16318861c13755d789d10e135dd0d6
2016-02-03 12:47:35 +00:00
Paul Belanger a377eeba05 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: I5c5fd1ef79e6ab08088ce58e45b593715d0e28ed
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:45:45 -05:00
Jesse Pretorius db4092d0f8 Merge bashate/pep8 lint jobs in common job
Instead of launching two separate build jobs in our CI infrastructure,
one for bashate and one for pep8, launch a single one. While the jobs
are short, the setup of the images takes a long time, so this is
friendlier to our CI infrastructure.

Use the pep8 environment as common lint target and merge the bashate job
into it.

This patch also renamed dev-requirements to test-requirements to bring it
into line with all other OpenStack projects.

Change-Id: Id282271e49cf427ada6a1bb5676c49463eb4420b
2015-12-15 09:34:39 +00:00
Jesse Pretorius a22b82780f Update run_tests to be more complete
This patch updates the run_tests convenience script to make it
execute all test environments using tox, but also ensures that
all the correct pre-requisites are in place before doing so.

Change-Id: I24ede2d40a33bc50ae93277d53dfd31af3294674
2015-11-25 19:16:19 +00:00
Kevin Carter a45aa3b2c1
IRR for apt_package_pinning
The change moves the role out from the main repo openstack-ansible
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-02 21:34:23 -06:00