Commit Graph

39 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov b9d9ccfc8a 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: Ib6f505093477a8b19ca8ae31ab7759904369a8c0
2022-12-27 17:53:34 +01:00
melissaml 1205049670 Cleanup py27 support
This repo is now testing only with Python
3, so let's make a few cleanups:
- Remove setup.* files, they are not needed for this repo
- Cleanup */source/conf.py to remove noww
  obsolete content.
- Remove install_cmd, move constraints into deps.

Change-Id: I1ae008c4a959cfd6a834ccb05353027c45e3e696
2020-04-27 20:33:48 +02:00
Ghanshyam Mann a67f4619f0 [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: I4dab9c720f7f45048113d1d0fa005c5e87511d7a
2020-03-01 19:22:41 -06:00
jacky06 48daf9453d 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: I303bfc77dc585010c9909ff7ab8002db2a5e2f18
2019-12-21 00:41:42 +08:00
Dmitriy Rabotyagov 0f18a223e8 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: If2171bb5ce432ca4576aad85b2b47ea830b8e6a0
Story: 2006105
2019-10-17 15:37:51 +00:00
tonybrad 9136da9015 Change the tests source to opendev
Change-Id: I2b76a7ed792ee9c17816cce5f46b84eb588aedd6
2019-05-21 08:53:09 +00:00
Doug Hellmann 2b1659104a 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: I78462a10ae17a99dce4e7d5677c05dbba346fe03
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:45:02 -04:00
Jesse Pretorius 19af6bb838 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: I78488e22069af48c4d86d0231af8dc83d55d6a50
Needed-By: https://review.openstack.org/579371
2018-08-16 18:30:13 +01:00
Nguyen Hung Phuong 08b7704802 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: If28474c5c68649785b19fd07bf9287da5f378e8e
2018-07-05 11:39:35 +07:00
Heba Naser accd37c054 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: I30c621e181cbcf2cc10fd855e00d42e448724412
2018-07-02 12:10:18 -04:00
Jesse Pretorius 33f9b867d8 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: I433be60aac36892e5a4d6c4fd61755d6b1b4eac4
2018-03-28 10:17:47 +01:00
Jesse Pretorius 36cac51e00 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: Ic14a9232d2dba930712967d59905efcc948ddc8b
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 18:03:48 +00:00
ZhongShengping 5c0f04f694 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: I02e496b0b9fd5003ca13ce6d5e83506dd96675f2
2018-03-09 12:01:28 +08:00
Jesse Pretorius daa4e153c5 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: I62127c565ef6e902353e14774d42ac2d23dd709d
2017-06-04 11:24:15 +01:00
Jesse Pretorius 855b90c9ee 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: I0ff409dd48649e999e36775d712e2609715115b0
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:54:37 +01:00
ji-xuepeng a2f5012b82 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I110547e7a41f7d9766f4188c08cc24ddc583ce70
2017-02-06 22:02:23 +08:00
gengchc2 6db4b27e17 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: Ic3833412295a625bd24d7025b2827a10ffd8c9f7
2016-12-06 09:12:00 +08:00
Jesse Pretorius fe8db3448a 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: I71d47bb14d46c45ac6514e76f0018ff40470dc42
2016-10-19 07:46:05 +01:00
Jesse Pretorius ceb94476c0 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I86cac59decff2a07ffadf642ea1f74a3e7ce6682
2016-10-05 12:18:48 +01:00
Jesse Pretorius c1e4f8d7d8 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: Id4e751564b8440a1c63fddfa872f19fa3bc19708
2016-10-04 11:44:38 +01:00
Jesse Pretorius 9aafde635d 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: I8d80c9d34b018ec73b2517256d7b62dbb2e2609a
2016-09-28 11:57:04 +01:00
Kevin Carter 3940a7853f Update testing bits for consistency
Change-Id: Ie3d9739f04384cbb9c18f45dbc396b3c0911c6a7
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:11:41 -04:00
Kevin Carter a888f8fd07 Convert role testing to use Ansible 2.1.1
Change-Id: I40cecfc65daeee8e0c45a8cf47f27289097d9e93
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-14 15:53:35 +00:00
Jesse Pretorius a1ba9fc5ad 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: Ife23b1d9118bd9c22eb2b62abb2842905a77f5fd
Related-Bug: #1620849
2016-09-09 10:55:32 +01:00
Kevin Carter 07aa872e9f 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: I4e70f44335088105659d449cc7ee68240d52e719
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:38:23 -05:00
Jesse Pretorius 9a784a376a 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: Ic31611300aaeafb1c75d281604dc252ec8e0e4da
2016-08-20 16:07:49 +01:00
Jean-Philippe Evrard 121058e2dd 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: Ib95c796c72cee041ba618cb07c5a44e76fe0f31a
2016-08-14 23:15:32 +00:00
Jesse Pretorius 1aa63aa7f4 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: I2789be3c39171c496d7b84ba30a10dd8adb80225
2016-07-26 00:46:02 +01:00
Jesse Pretorius b4e13ba16e 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: I3c817b3019a892611d8dfbe0a1b3d3610857afdb
2016-07-15 14:04:55 +01:00
Jesse Pretorius 7ec9da923f 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: Ie2f93228d701eee9e6168173b319f2557d7f7c3d
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:58:04 +01:00
Jesse Pretorius 501f4fcddd 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: Iae6b20a4f6c4d8156a55977dfa81b3fa5cd53034
2016-07-08 13:37:38 +01:00
Jimmy McCrory 954770e1da Reorganize test playbooks
The following changes have been made to reorganize the structure of this
role's test playbooks, bringing them into line with other
OpenStack-Ansible roles:
  - move each playbook to an individual file
  - rename playbooks descriptively
  - define hosts and groups directly in the inventory file
  - include group vars required by containers
  - reduce lxc network dhcp network range to avoid conflicts with static
    container addresses
  - enable verbose logging for functional test output
  - remove unnecessary delegations in functional test playbook

Change-Id: I5b0ab466a7374d3012ff60e2da677b0c30c966b2
2016-05-04 17:06:52 -07:00
Jesse Pretorius 9c93f70f48 Add reno scaffolding for release notes management
Change-Id: Ie9969e4633a3e713797eb4150a90dda22967029b
2016-04-09 19:22:15 +01:00
Jesse Pretorius cb23eddc96 Implement human readable logging for functional tests
This patch implements a callback plugin to provide human readable logging
for functional tests in order to aid the resolution of any functional testing
failures.

Change-Id: Ib58a3a500de959a8f7ee2ce1c258a32b6116a2e1
2016-03-01 16:04:36 +00:00
Jesse Pretorius be5a90f2e8 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: I078ad3c5751b7da09ec8553c90f261fc4d2f534f
2016-02-12 11:59:02 +00:00
Jesse Pretorius b7037da52b 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: I0ca425dedfd4e8880e7d28c42dcaab3715ad0183
2016-02-03 13:07:28 +00:00
Paul Belanger 657715a434 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: Ie91973466d6779d13d60787decb5a5861578ae0a
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:49:21 -05:00
Jesse Pretorius 1fe7f8b4b6 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: Icd665718713fcd7ad4a598c73268a346d511c8e5
2015-12-15 10:37:05 +00:00
Kevin Carter 725222afee
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:25:37 -06:00