Commit Graph

44 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov e097077529 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: I2c6fc60cda0151fc6cd23951c4c976b9cef6a543
2022-12-27 17:53:11 +01:00
melissaml 301b5cd5fd Cleanup py27 support
This repo is now testing only with Python
3, so let's make a few cleanups:
- Remove setup.* files, those are not needed
  for this repo
- Cleanup */source/conf.py to remove now
  obsolete content.
- Remove install_cmd from tox.ini, the default is fine;
  move constraints into deps, cleanup

Change-Id: I6dae70865bac5abb0d394e93c2a854e74c2689d7
2020-04-27 20:17:51 +02:00
Ghanshyam Mann d3169c0949 [ussuri][goal] Updates for python 2.7 drop
OpenStack is dropping the py2.7 support in ussuri cycle.

openstack-ansible repos need few updates on requirements file.

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: Iecff3395b239717ef3667948e54768f7705ae12d
2020-03-02 20:34:58 +00:00
jacky06 792f1c5640 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: Iec29a958241b65cb3f7e8933169a6e55c6a39656
2019-10-23 17:41:08 +00:00
Dmitriy Rabotyagov 7ac02f39f4 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: Iabe812ee7e25838132fa2b1e0372df7bb0b0bd0d
Story: 2006105
2019-10-17 19:30:21 +03:00
pengyuesheng 9c3c35cde1 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I139ef3551f83b711c792ce54d3165c97318f802c
2019-09-26 10:58:45 +08:00
melissaml 60a5e13915 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I10390b2720bc078189d2a9cc39387a6764085a5f
2019-05-06 20:05:28 +08:00
huang.zhiping dd32258858 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: I0948580a0a76a70d8276ead61de95c1965a1d324
Closes-Bug:  #1801657
2019-04-07 05:05:14 +00:00
Doug Hellmann d999a95b43 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: I61d32a76fe834c8f882508f25fbca869994ea20e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:13 -04:00
Zuul bb1bf82155 Merge "fix tox python3 overrides" 2018-08-23 03:37:34 +00:00
Jesse Pretorius e014d039fd 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: Iacbc9ae24b2d5bdcbaef9c5127c37eddbf2e755a
Needed-By: https://review.openstack.org/579371
2018-08-16 15:25:20 +01:00
Nguyen Hung Phuong b6f6830527 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: I07247b4eeb9a32d266f32d01340f8db394f6d8a2
2018-07-05 14:21:30 +07:00
Heba Naser 1eed8fd786 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: Ie58bf2e8211f57657b66db9d38fee3d1d00e7098
2018-07-02 08:44:20 -04:00
Jesse Pretorius 22b9be1248 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: Iead678057f3888fe7aaddce6685865f4fcdfed53
2018-03-28 10:11:34 +01:00
Jesse Pretorius f434c30054 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: I5ba653fceec3db1073ab639d835f6a250b11a4e6
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:56:19 +00:00
ZhongShengping 6eb5907be5 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: I0e329f1414787aaedc59835600a3c972bb817f9c
2018-03-09 12:01:25 +08:00
Kevin Carter 28c66bee59
Add functional tests for our different backendstores
This change adds several tox functional sections to support our
different backend storage options. This change will allow us to create
jenkens jobs specific to the various backends to validate they work as
we expect them to.

Change-Id: Ic1152ae666973af8c01499bb5ca89d8eeaa5f1d2
Depends-On: I70d53cabd0888954f31def924e9f4436398cdebf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-10-06 10:54:04 -05:00
Jesse Pretorius 0e117d8981 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: I8a8fdc0b08b5df02e1d275ffd69944a5f83be4e8
2017-06-04 11:18:31 +01:00
Jesse Pretorius 75b8ba773b 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: I89d06e204c64eda194da827c59e7506cac9b57f8
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:49:31 +01:00
ji-xuepeng b11955b357 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I1bc740ed4b77f1061b02e2bab87626675628956e
2017-02-06 21:18:34 +08:00
gecong1973 b37b1e8fde 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: Ibe939be1f976dbfa0f01cf6facba6f1b543ee585
2016-12-04 10:34:05 +08:00
Jesse Pretorius 85aaed9703 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: I51083ed56bcf6fe7f22dc8bd3c3e5c1e563a81af
2016-10-19 07:40:34 +01:00
Jesse Pretorius 09859cdd77 Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I76c20a016095a7a6ba2c0fbb878c6e62366f9d51
2016-10-05 12:12:10 +01:00
Jesse Pretorius a179db9404 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: Ia622deb070a120ed42065a4722efd588fc8596d7
2016-10-04 11:39:27 +01:00
Jesse Pretorius 61587e89fb 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: I8265d00c0e7c6ba9ee483098effed4e20027398b
2016-09-27 16:16:22 +01:00
Kevin Carter 44196c54ed Update testing bits for consistency
Change-Id: I32ce64eb490db8df7e379c7f39e0ec11973075bf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-17 17:09:10 -04:00
Major Hayden 3e73c5b3fb Ansible 2.1.1 role testing
Change-Id: I9132c4686f130610de24a2c7b002172d3daf3bff
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-12 15:19:55 -04:00
Jesse Pretorius 84b73aea3f 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: I117324c77d1539e130f9cc6daa6f0ceadc1e4f28
Related-Bug: #1620849
2016-09-09 10:14:10 +01:00
Kevin Carter e81381092e 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: I1727cc755bf54ba8fce395a3f6a73acb7e66c106
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:33:53 -05:00
Jesse Pretorius 166a4783a7 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: I5a5ee0d8c6f4dc777e1bcb8b59d285487a6396e6
2016-08-20 16:03:39 +01:00
Jean-Philippe Evrard 820597f20b 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: Ib330ba2cbeeded7087a5e9d025aa1a03666c9b57
2016-08-11 18:08:04 +01:00
Jesse Pretorius 5332e624da 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: I9849dc55c2c093ae0bc2ee8527907fa233a0a861
2016-07-25 22:48:25 +01:00
Jesse Pretorius 1d644e6f74 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: Ied88dd355c41e48566c6179333930d625dc9637c
2016-07-15 14:00:43 +01:00
Jesse Pretorius 98df272d87 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: I260d79682154786b898ba32c4ba7d1b36318f906
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:54:01 +01:00
Jesse Pretorius 5be9099016 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: I5b5bf304746010a518f9743661079ce061335eb4
2016-07-08 13:33:24 +01:00
Kevin Carter 0c16334a2c
updated for lxc-container-create for multi-distro support
This change updates the lxc-container-create role to build lxc containers
using the download template. The build supports ubuntu 14.04/16.04 and
RedHat/CentOS 7 using the multi-distro framework.

This change is incorporating updates built into the lxc_hosts role. Once
merged this should unblock all work geared toward multi-distro support and
testing. The testing structure has been updated to match what is being done
in other roles.

A new file was created "manual-tests.rc" which assists in manual testing
by exporting the needed environment variables to run the role tests without
requiring everything to run through tox which has undesirable side-effects
when running tests that span multiple roles.

Change-Id: Iee304dd026e0865e0444259d2132122233d90f5f
Depends-On: Ie13be2322d28178760481c59805101d6aeef4f36
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-03 15:15:34 -05:00
Jesse Pretorius dfa142f977 Add reno scaffolding for release notes management
Change-Id: Ia6dbf69c8dc37ad204ae74227d759c0d8fb5aeb4
2016-04-09 19:18:38 +01:00
Jesse Pretorius 9d0468897c 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: Ifd7bcd71672bf0627f4877b3e278a2fadd17e1aa
2016-03-05 23:19:37 +00:00
Jesse Pretorius b4b04da460 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: Ib626a7efc1bf5ea6db46445899c01b3e1dc66820
2016-02-12 11:30:15 +00:00
Jesse Pretorius 9adc37efcd 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: I5eb613042eb20dd445ecfc020670066826e63e81
2016-02-03 14:07:06 +00:00
Paul Belanger cd76bb4cd2 Switch to testenv:functional
This brings our tox.ini files inline with other OpenStack projects.

Change-Id: If59a2f58a2cf3f4dade666518fff0ac5830860c9
Depends-On: I376e51824c46f9b5eb4a4cff01aaa176632087dd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-12-18 15:42:44 -05:00
Jesse Pretorius 3e9b2930a6 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: I506c541ba715d2bf506d090aa8fb014a7a2f216f
2015-12-15 09:34:25 +00:00
Jesse Pretorius 37a1f4cd16 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: If188d528944470cf99d2551c284e2c5cba4a4aac
2015-12-09 13:41:26 +00:00
Kevin Carter 8f8cf55edd
IRR for lxc_container_create
The change moves the role out from the main repo lxc_container_create
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-03 08:00:45 -06:00