Commit Graph

37 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 3e71170672 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: Ib30ad75b70011fa9c74f8f57e41b0b85e2007003
2022-12-27 17:53:15 +01:00
Jonathan Rosser 3db6d9d5f6 Cleanup setup.py config
Change-Id: I9f1c92c79240f52d25fef502d27316ea1b9887ba
2022-04-04 10:12:50 +01:00
zhoulinhui 3387d719ad Replace deprecated UPPER_CONSTRAINTS_FILE variable
Change-Id: I46abac4a8a8a87b4818697f9c7006a84701bbe4f
2020-11-10 13:11:24 +08:00
melissaml 9c08fd4e32 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 noww
 obsolete content.

Change-Id: I615bbc9996eddfa98acc94d977f4a4867a49a8db
2020-04-14 20:36:32 +08:00
Ghanshyam Mann 8e59463766 [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: I1d83909c44db843eee4b43a07b2538cc40235fa6
2020-03-01 16:04:56 +00:00
jacky06 df1a24c9ce 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: Ia1dafae837c6ba68781a33a0d7d39aa3ab0c4876
2019-10-23 17:37:36 +00:00
Dmitriy Rabotyagov c24af1a2b9 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: I6e1bcb984c94f885f7bfa8c78712daadfae3fc39
Story: 2006105
2019-10-17 15:39:34 +00:00
pengyuesheng c4011bc0ad Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I3b59a92e28c5d91008fffa3591cb245c9b058149
2019-09-26 11:02:03 +08:00
huang.zhiping cbf739c20e 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: If6d3815932ea2c128cec0fe93db49936de939963
Closes-Bug:  #1801657
2019-03-05 02:00:31 +00:00
Doug Hellmann 87844ef8e2 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: I952f07e4de593b377d176a06ad32f3c94c3b3969
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:42:35 -04:00
Jesse Pretorius b3a92ff9d9 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: I02f12b3e434ad5829ac44388f11ef686a7c6ed93
Needed-By: https://review.openstack.org/579371
2018-08-16 15:29:04 +01:00
Heba Naser ea4c375f8e 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: I459cdc27d18d17510105b4c23dbca9c3f6696bfe
2018-07-02 10:10:22 -04:00
Jesse Pretorius 2b88c83e50 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: I12a3adfeb742e1c987c1c852cc0214601d5b4a68
2018-03-28 10:12:31 +01:00
Jesse Pretorius 328bdf5f94 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: I584ab28aa2b12f63e894232f690894366f09f6d7
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-15 17:57:19 +00:00
ZhongShengping 6adb638811 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: I7c24a602f602b73d6fe77b7866196c54c1937917
2018-03-09 12:01:26 +08:00
Jesse Pretorius 8a75813f01 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: I4ae20f93761c33b1a6d87790c13c1495057a2844
2017-06-04 11:19:17 +01:00
Jesse Pretorius d572621f64 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: I29018e62701d9ce59d0a30a5c4972425ccdeab00
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:50:08 +01:00
ji-xuepeng 4851f533c0 Use https instead of http for git.openstack.org
Trivialfix

Change-Id: I5a3500f9826736d17ac836f135aa48040c650d78
2017-02-06 23:07:20 +08:00
gengchc2 0e0401b8b5 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: I6cc298835959708f87e80dd7255b14c79676b47d
2016-12-06 09:42:42 +08:00
Jesse Pretorius b06f7401be 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: I5be4ef1fea1114673faf887e29ea6800f159b54c
2016-10-19 07:41:15 +01:00
Jesse Pretorius a1c14b1ff2 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: I89f0f94c12cf1a152e81eb6507216f8c3ae8db36
2016-10-10 16:39:37 +01:00
Jesse Pretorius ff71d146bc 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: I04ff8e8cce4723e7df0577388b4a8011faeefdf1
2016-10-04 11:40:09 +01:00
Jesse Pretorius cd79675864 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: I0f619c4215cca07eb44407cd74cf78b9ed32a1b8
2016-09-27 17:13:22 +01:00
Travis Truman f73263b6ff Removing rolename var, galaxy init and clone
The role gate was setting up a bunch of config that
is no longer needed now that we are using Ansible 2.1.1

Further, the test and plugins repos were being cloned
but neither are used by the role or the role testing.

Finally, a tox call to ansible-galaxy init was removed
that served no obvious purpose.

Change-Id: Ia559b29d05a6f26ef486b382d291524b6d799cc5
2016-09-22 15:12:16 -04:00
Kevin Carter 0e9015f7a5 Update testing bits for consistency
Change-Id: I0ee709f6df9efcfecc97c62b5bb47b73a061f922
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 09:16:09 +00:00
Jesse Pretorius 62e3065441 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: Id7388cb3ed6366c4dfb62549b03643ed6492e437
Related-Bug: #1620849
2016-09-09 10:24:29 +01:00
Kevin Carter a45ef54b8e 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: I8989aca13871d6169ccc271775be92a80a5e072b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-29 21:34:14 -05:00
Jesse Pretorius b7d27c2716 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: I06bf85b87f669c8f5a68c3af60a1be84d13763ab
2016-08-20 16:04:13 +01:00
Jean-Philippe Evrard 5931daee42 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: I7580a411d4404a3a4dc4e1af3a14c2faec1a226f
2016-08-11 18:08:23 +01:00
Jesse Pretorius e12843eea5 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: I7461f13ba20aca33bb339e344b88189e043189d0
2016-07-25 22:55:21 +01:00
Jesse Pretorius ee01beeedf 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: Ibfdfa146a0ae13cba090f57795152e5164779a1f
2016-07-15 14:01:10 +01:00
Jenkins 1ac1625868 Merge "Adding idempotency testing to the role func test" 2016-07-13 16:45:29 +00:00
Jesse Pretorius b5459cec5a 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: I9a70135f07c3faed957fd2438526d2059ac89594
Partially-Implements: blueprint osa-install-guide-overhaul
2016-07-13 12:54:26 +01:00
Travis Truman 566c3ad207 Adding idempotency testing to the role func test
While not particularly important for this role,
this should establish a reusable pattern for adding
such testing to other roles.

Change-Id: Ia700cfd11c8f15e81f5f767dd723e5a323159919
2016-07-11 10:29:00 -04:00
Jesse Pretorius 67f3cac059 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: Ifed328167fd645d1d835f998075a17912af12675
2016-07-08 12:43:38 +00:00
Jesse Pretorius 47bf70352f Add reno scaffolding for release notes management
Change-Id: I3a16a5d3874d74bbbbc90b30acd0899b4a7c5b32
2016-04-09 19:19:22 +01:00
Matt Thompson 7e759bc93b Implement base configuration for independent repository
This is a first pass at bringing in the necessary bits for the gate to
successfully pass.

Change-Id: I915031259a9415cc44a97a906a7607672a606e18
2016-03-01 16:34:59 +00:00