Commit Graph

42 Commits

Author SHA1 Message Date
Jonathan Rosser c3d105fd9e Cleanup setup.py config
Change-Id: I374ecd16922092221307204cee5395ca8eef7480
2022-04-04 10:20:47 +01:00
likui 426a25ec0b Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: If2c5ecd67aba8a5979bf4fbbca38cb3217b6c1b8
2021-07-03 21:57:43 +08:00
zhoulinhui 77944eef30 Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I9bd1c602e1e287f3da284f4604b042007fb4ade4
2020-11-10 13:12:01 +08:00
melissaml ad5a658b54 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
- Remove obsolete sections from setup.cfg
- Cleanup doc/source/conf.py to remove now obsolete content.

Change-Id: I7b01050c13a960ad603a2d223530ed43e551a274
2020-04-14 18:38:31 +08:00
Ghanshyam Mann 640437dbd4 [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: I7d1d58fb906ce8c13ab3648007e239ec665bde3b
2020-03-01 18:55:17 -06:00
jacky06 ac7a808d2e 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: I4fc80984d398f5c9d5a33c6a06f688fc1e777297
2019-10-23 17:37:24 +00:00
Dmitriy Rabotyagov 2e31110da3 PDF Documentation Build tox target
This patch adds a `pdf-docs` tox target that will build
PDF versions of our docs. As per the Train community goal:

  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.

Change-Id: I6ae29f8a01529bd4786547a11b73171e008dfd0b
Story: 2006105
2019-10-18 18:28:36 +03:00
melissaml c53e631763 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I73a8bb8682d3daf027bc3b532912c852121afbae
2019-07-11 06:04:51 +08:00
huang.zhiping 707c8dbedb 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: I61b7509084240a2828afea5ed1ee477907cf4c79
Closes-Bug:  #1801657
2019-01-12 03:24:53 +00:00
Doug Hellmann ad5ea4070c 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: I8ea3bb5e66f25800002fa9f5be7e29a4ddaa0df9
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:44:12 -04:00
Zuul d61d3acc68 Merge "fix tox python3 overrides" 2018-08-28 05:57:48 +00:00
Jesse Pretorius 9563704bf0 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: I33a35ad7f946b01c5292da2e67a94f4b6956388b
Needed-By: https://review.openstack.org/579371
2018-08-16 18:24:36 +01:00
Nguyen Hung Phuong 61864728c5 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: I115c256b07894f59f11a43c7bdb2cf75863265eb
2018-07-05 14:05:39 +07:00
Heba Naser 6c98584015 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: I8df9f72bc23b7552b3097be51bc18cd1ed0e84d4
2018-07-02 11:26:33 -04:00
Jesse Pretorius ba81cc9050 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: Ia392beb51cdbcfc802fd803effeb990276456de5
2018-03-28 10:15:59 +01:00
Jesse Pretorius e54f9e4384 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: I4cc7771ef22cae52b58464a3e68a9febd74828ac
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 18:01:32 +00:00
ZhongShengping 17c9afe0c2 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: I5f62438a1003a07364aee5380be004b2a3b94fab
2018-03-09 12:01:27 +08:00
Jesse Pretorius bcd0ab8bc9 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: I2ca6f08645a15e0b7393f378324dd9919170b7c6
2017-06-04 11:22:38 +01:00
Jesse Pretorius cab2a12c46 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: Ia14642622b7dab5eecff0bca7c8cff8763c16d92
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:53:00 +01:00
gecong1973 852b4299b0 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: Icc03742921f7a177ac7e7d0faf33d0f7916ff9e5
2017-02-06 11:11:33 +08:00
gecong1973 d0371fe182 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: I1aa0510dd8ce512d8dcf1559de9f6165a3e89fa7
2016-12-05 09:24:27 +08:00
Jesse Pretorius 046874210f 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: I4392ffa5f8d6ef8df1f1f49d68ff22d23267b076
2016-10-19 07:44:06 +01:00
Jesse Pretorius e795959568 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: Iefd28bcfc32e3f10d2721c5bd8db686a90c77b22
2016-10-05 18:25:34 +01:00
Deepak 927bcaf586 Update test-vars.yml for repositories
Renamed in os_rally role repo
Changed test-vars.yml to os_rally-overrides.yml
Removed test-vars.yml

Change-Id: I73c0a045496f7c36bd00748cb2096d20b5aa7b7b
Partial-Bug: #1629284
2016-10-05 22:01:48 +05:30
Jesse Pretorius b0c43977a8 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: I98aeeb8f08ca2affc3db2042ec52a0317d4fb226
2016-10-04 11:42:36 +01:00
Jesse Pretorius 0e3fe0b5fa 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: Ib1ed37c6994688775f44ca11df36e8222b0ce05d
2016-09-28 11:34:10 +01:00
Jenkins e1a0b49d8c Merge "delete python bytecode including pyo before every test run" 2016-09-21 06:21:23 +00:00
Kevin Carter 4fb142762e Update testing bits for consistency
Change-Id: I6835cefb6ca2eabc6d4bfbb8f2cd66479d0247cb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 16:55:27 -04:00
avnish dda5f299f9 delete python bytecode including pyo before every test run
Change-Id: I1e51ba4f4aa4c8c3b535ba594cb7cb355ca49383
2016-09-16 09:38:34 +05:30
Kevin Carter 9f93c1f166 Add role linking to tox tests
Change-Id: I559ce1784c6f4796a9f2de72b6ff778ffe2d065a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-14 11:07:29 -05:00
Travis Truman 9f281faa84 Ansible 2.1.x role testing
Change-Id: I2c4ee100870f10b132d392ced5bb8783fd878863
2016-09-12 14:54:15 -04:00
Jesse Pretorius 6c33995f3b 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.

Change-Id: I60842285cd915d3c61b54003328408a8fc3d68f2
Related-Bug: #1620849
2016-09-09 10:45:41 +01:00
Kevin Carter 03e48682de 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: I8e95d9aa322ea1f1006dcbca169cc518c0e1361d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:37:17 -05:00
Jesse Pretorius 50188e880d 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: Ib3576a0333dee510d3f08aca6f4a9bbb1eeda4e5
2016-08-20 16:06:36 +01:00
Jean-Philippe Evrard a431c39a67 Include ansible commands for ansible linting
The plugin repo needs to be cloned for ansible-lint to
understand ansible plugins. The commands currently
reside in tox.ini under the ansible section and are not
currently included. This commit fixes that error.

Change-Id: I7d209c68ec1bf6760f84048d1f9983476ff82e68
2016-08-11 18:10:06 +01:00
Jesse Pretorius 254418abe8 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: Iacff67847b0708a5d41ab3e1accf59f40326497d
2016-07-26 07:38:59 +01:00
Jesse Pretorius 32e3b2ad1f 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: I173f065f004d3336f6249625c8c36a609742389e
2016-07-15 14:03:33 +01:00
Jesse Pretorius 63c914f297 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: I4da740890257f083b4ba12ff4ed321933109d01b
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:56:47 +01:00
Jesse Pretorius dc84bd9ae5 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: I03a60477abffb2b1c4a2dc7bd2979a22483a25a7
2016-07-08 13:36:18 +01:00
Jesse Pretorius ed43c8bef9 Add reno scaffolding for release notes management
Change-Id: I1bbde30bf20cfbd2a94e8dc24b229a68f762b636
2016-04-09 19:53:30 +01:00
Travis Truman 329318acfa Adding testing 2016-03-25 11:28:16 -04:00
Travis Truman 1e6d9b3a46 Inital commit 2016-03-24 17:13:47 -04:00